diff --git a/.arcignore b/.arcignore deleted file mode 100644 index cd917b06fb7..00000000000 --- a/.arcignore +++ /dev/null @@ -1,12 +0,0 @@ -# .arcignore is the same as .gitignore but for Arc VCS. -# Arc VCS is a proprietary VCS in Yandex that is very similar to Git -# from the user perspective but with the following differences: -# 1. Data is stored in distributed object storage. -# 2. Local copy works via FUSE without downloading all the objects. -# For this reason, it is better suited for huge monorepositories that can be found in large companies (e.g. Yandex, Google). -# As ClickHouse developers, we don't use Arc as a VCS (we use Git). -# But the ClickHouse source code is also mirrored into internal monorepository and our collegues are using Arc. -# You can read more about Arc here: https://habr.com/en/company/yandex/blog/482926/ - -# Repository is synchronized without 3rd-party submodules. -contrib diff --git a/.clang-tidy b/.clang-tidy index b0971418e0e..ecb8ac6dcbf 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -203,3 +203,5 @@ CheckOptions: value: CamelCase - key: readability-identifier-naming.UsingCase value: CamelCase + - key: modernize-loop-convert.UseCxx20ReverseRanges + value: false diff --git a/.github/ISSUE_TEMPLATE/85_bug-report.md b/.github/ISSUE_TEMPLATE/85_bug-report.md index d78474670ff..87a2d877e30 100644 --- a/.github/ISSUE_TEMPLATE/85_bug-report.md +++ b/.github/ISSUE_TEMPLATE/85_bug-report.md @@ -9,7 +9,7 @@ assignees: '' > You have to provide the following information whenever possible. -**Describe the bug** +**Describe what's wrong** > A clear and concise description of what works not as it is supposed to. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a2930beb89f..82a16d0589f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,3 @@ -I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en - Changelog category (leave one): - New Feature - Improvement diff --git a/.gitignore b/.gitignore index a469ff7bca1..0bf31508419 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,9 @@ /docs/ja/single.md /docs/fa/single.md /docs/en/development/cmake-in-clickhouse.md +/docs/ja/development/cmake-in-clickhouse.md +/docs/zh/development/cmake-in-clickhouse.md +/docs/ru/development/cmake-in-clickhouse.md # callgrind files callgrind.out.* diff --git a/.gitmodules b/.gitmodules index 37b22527eb4..74d1049ce01 100644 --- a/.gitmodules +++ b/.gitmodules @@ -246,3 +246,6 @@ [submodule "contrib/bzip2"] path = contrib/bzip2 url = https://github.com/ClickHouse-Extras/bzip2.git +[submodule "contrib/magic_enum"] + path = contrib/magic_enum + url = https://github.com/Neargye/magic_enum diff --git a/AUTHORS b/AUTHORS index 12838d7fa14..1d2e5adc523 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,2 +1,2 @@ -To see the list of authors who created the source code of ClickHouse, published and distributed by YANDEX LLC as the owner, +To see the list of authors who created the source code of ClickHouse, published and distributed by ClickHouse, Inc. as the owner, run "SELECT * FROM system.contributors;" query on any ClickHouse server. diff --git a/CHANGELOG.md b/CHANGELOG.md index 71cdac17825..2fab014706b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,213 @@ +### ClickHouse release v21.9, 2021-09-09 + +#### Backward Incompatible Change + +* Do not output trailing zeros in text representation of `Decimal` types. Example: `1.23` will be printed instead of `1.230000` for decimal with scale 6. This closes [#15794](https://github.com/ClickHouse/ClickHouse/issues/15794). It may introduce slight incompatibility if your applications somehow relied on the trailing zeros. Serialization in output formats can be controlled with the setting `output_format_decimal_trailing_zeros`. Implementation of `toString` and casting to String is changed unconditionally. [#27680](https://github.com/ClickHouse/ClickHouse/pull/27680) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Do not allow to apply parametric aggregate function with `-Merge` combinator to aggregate function state if state was produced by aggregate function with different parameters. For example, state of `fooState(42)(x)` cannot be finalized with `fooMerge(s)` or `fooMerge(123)(s)`, parameters must be specified explicitly like `fooMerge(42)(s)` and must be equal. It does not affect some special aggregate functions like `quantile` and `sequence*` that use parameters for finalization only. [#26847](https://github.com/ClickHouse/ClickHouse/pull/26847) ([tavplubix](https://github.com/tavplubix)). +* Under clickhouse-local, always treat local addresses with a port as remote. [#26736](https://github.com/ClickHouse/ClickHouse/pull/26736) ([Raúl Marín](https://github.com/Algunenano)). +* Fix the issue that in case of some sophisticated query with column aliases identical to the names of expressions, bad cast may happen. This fixes [#25447](https://github.com/ClickHouse/ClickHouse/issues/25447). This fixes [#26914](https://github.com/ClickHouse/ClickHouse/issues/26914). This fix may introduce backward incompatibility: if there are different expressions with identical names, exception will be thrown. It may break some rare cases when `enable_optimize_predicate_expression` is set. [#26639](https://github.com/ClickHouse/ClickHouse/pull/26639) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Now, scalar subquery always returns `Nullable` result if it's type can be `Nullable`. It is needed because in case of empty subquery it's result should be `Null`. Previously, it was possible to get error about incompatible types (type deduction does not execute scalar subquery, and it could use not-nullable type). Scalar subquery with empty result which can't be converted to `Nullable` (like `Array` or `Tuple`) now throws error. Fixes [#25411](https://github.com/ClickHouse/ClickHouse/issues/25411). [#26423](https://github.com/ClickHouse/ClickHouse/pull/26423) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Introduce syntax for here documents. Example `SELECT $doc$ VALUE $doc$`. [#26671](https://github.com/ClickHouse/ClickHouse/pull/26671) ([Maksim Kita](https://github.com/kitaisreal)). This change is backward incompatible if in query there are identifiers that contain `$` [#28768](https://github.com/ClickHouse/ClickHouse/issues/28768). + +#### New Feature + +* Implementation of short circuit function evaluation, closes [#12587](https://github.com/ClickHouse/ClickHouse/issues/12587). Add settings `short_circuit_function_evaluation` to configure short circuit function evaluation. [#23367](https://github.com/ClickHouse/ClickHouse/pull/23367) ([Kruglov Pavel](https://github.com/Avogar)). +* Add support for INTERSECT, EXCEPT, ANY, ALL operators. [#24757](https://github.com/ClickHouse/ClickHouse/pull/24757) ([Kirill Ershov](https://github.com/zdikov)). ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add support for encryption at the virtual file system level (data encryption at rest) using AES-CTR algorithm. [#24206](https://github.com/ClickHouse/ClickHouse/pull/24206) ([Latysheva Alexandra](https://github.com/alexelex)). ([Vitaly Baranov](https://github.com/vitlibar)) [#26733](https://github.com/ClickHouse/ClickHouse/pull/26733) [#26377](https://github.com/ClickHouse/ClickHouse/pull/26377) [#26465](https://github.com/ClickHouse/ClickHouse/pull/26465). +* Added natural language processing (NLP) functions for tokenization, stemming, lemmatizing and search in synonyms extensions. [#24997](https://github.com/ClickHouse/ClickHouse/pull/24997) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added integration with S2 geometry library. [#24980](https://github.com/ClickHouse/ClickHouse/pull/24980) ([Andr0901](https://github.com/Andr0901)). ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). +* Add SQLite table engine, table function, database engine. [#24194](https://github.com/ClickHouse/ClickHouse/pull/24194) ([Arslan Gumerov](https://github.com/g-arslan)). ([Kseniia Sumarokova](https://github.com/kssenii)). +* Added support for custom query for `MySQL`, `PostgreSQL`, `ClickHouse`, `JDBC`, `Cassandra` dictionary source. Closes [#1270](https://github.com/ClickHouse/ClickHouse/issues/1270). [#26995](https://github.com/ClickHouse/ClickHouse/pull/26995) ([Maksim Kita](https://github.com/kitaisreal)). +* Add shared (replicated) storage of user, roles, row policies, quotas and settings profiles through ZooKeeper. [#27426](https://github.com/ClickHouse/ClickHouse/pull/27426) ([Kevin Michel](https://github.com/kmichel-aiven)). +* Add compression for `INTO OUTFILE` that automatically choose compression algorithm. Closes [#3473](https://github.com/ClickHouse/ClickHouse/issues/3473). [#27134](https://github.com/ClickHouse/ClickHouse/pull/27134) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Add `INSERT ... FROM INFILE` similarly to `SELECT ... INTO OUTFILE`. [#27655](https://github.com/ClickHouse/ClickHouse/pull/27655) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Added `complex_key_range_hashed` dictionary. Closes [#22029](https://github.com/ClickHouse/ClickHouse/issues/22029). [#27629](https://github.com/ClickHouse/ClickHouse/pull/27629) ([Maksim Kita](https://github.com/kitaisreal)). +* Support expressions in JOIN ON section. Close [#21868](https://github.com/ClickHouse/ClickHouse/issues/21868). [#24420](https://github.com/ClickHouse/ClickHouse/pull/24420) ([Vladimir C](https://github.com/vdimir)). +* When client connects to server, it receives information about all warnings that are already were collected by server. (It can be disabled by using option `--no-warnings`). Add `system.warnings` table to collect warnings about server configuration. [#26246](https://github.com/ClickHouse/ClickHouse/pull/26246) ([Filatenkov Artur](https://github.com/FArthur-cmd)). [#26282](https://github.com/ClickHouse/ClickHouse/pull/26282) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Allow using constant expressions from with and select in aggregate function parameters. Close [#10945](https://github.com/ClickHouse/ClickHouse/issues/10945). [#27531](https://github.com/ClickHouse/ClickHouse/pull/27531) ([abel-cheng](https://github.com/abel-cheng)). +* Add `tupleToNameValuePairs`, a function that turns a named tuple into an array of pairs. [#27505](https://github.com/ClickHouse/ClickHouse/pull/27505) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Add support for `bzip2` compression method for import/export. Closes [#22428](https://github.com/ClickHouse/ClickHouse/issues/22428). [#27377](https://github.com/ClickHouse/ClickHouse/pull/27377) ([Nikolay Degterinsky](https://github.com/evillique)). +* Added `bitmapSubsetOffsetLimit(bitmap, offset, cardinality_limit)` function. It creates a subset of bitmap limit the results to `cardinality_limit` with offset of `offset`. [#27234](https://github.com/ClickHouse/ClickHouse/pull/27234) ([DHBin](https://github.com/DHBin)). +* Add column `default_database` to `system.users`. [#27054](https://github.com/ClickHouse/ClickHouse/pull/27054) ([kevin wan](https://github.com/MaxWk)). +* Supported `cluster` macros inside table functions 'cluster' and 'clusterAllReplicas'. [#26913](https://github.com/ClickHouse/ClickHouse/pull/26913) ([polyprogrammist](https://github.com/PolyProgrammist)). +* Add new functions `currentRoles()`, `enabledRoles()`, `defaultRoles()`. [#26780](https://github.com/ClickHouse/ClickHouse/pull/26780) ([Vitaly Baranov](https://github.com/vitlibar)). +* New functions `currentProfiles()`, `enabledProfiles()`, `defaultProfiles()`. [#26714](https://github.com/ClickHouse/ClickHouse/pull/26714) ([Vitaly Baranov](https://github.com/vitlibar)). +* Add functions that return (initial_)query_id of the current query. This closes [#23682](https://github.com/ClickHouse/ClickHouse/issues/23682). [#26410](https://github.com/ClickHouse/ClickHouse/pull/26410) ([Alexey Boykov](https://github.com/mathalex)). +* Add `REPLACE GRANT` feature. [#26384](https://github.com/ClickHouse/ClickHouse/pull/26384) ([Caspian](https://github.com/Cas-pian)). +* `EXPLAIN` query now has `EXPLAIN ESTIMATE ...` mode that will show information about read rows, marks and parts from MergeTree tables. Closes [#23941](https://github.com/ClickHouse/ClickHouse/issues/23941). [#26131](https://github.com/ClickHouse/ClickHouse/pull/26131) ([fastio](https://github.com/fastio)). +* Added `system.zookeeper_log` table. All actions of ZooKeeper client are logged into this table. Implements [#25449](https://github.com/ClickHouse/ClickHouse/issues/25449). [#26129](https://github.com/ClickHouse/ClickHouse/pull/26129) ([tavplubix](https://github.com/tavplubix)). +* Zero-copy replication for `ReplicatedMergeTree` over `HDFS` storage. [#25918](https://github.com/ClickHouse/ClickHouse/pull/25918) ([Zhichang Yu](https://github.com/yuzhichang)). +* Allow to insert Nested type as array of structs in `Arrow`, `ORC` and `Parquet` input format. [#25902](https://github.com/ClickHouse/ClickHouse/pull/25902) ([Kruglov Pavel](https://github.com/Avogar)). +* Add a new datatype `Date32` (store data as Int32), support date range same with `DateTime64` support load parquet date32 to ClickHouse `Date32` Add new function `toDate32` like `toDate`. [#25774](https://github.com/ClickHouse/ClickHouse/pull/25774) ([LiuNeng](https://github.com/liuneng1994)). +* Allow setting default database for users. [#25268](https://github.com/ClickHouse/ClickHouse/issues/25268). [#25687](https://github.com/ClickHouse/ClickHouse/pull/25687) ([kevin wan](https://github.com/MaxWk)). +* Add an optional parameter to `MongoDB` engine to accept connection string options and support SSL connection. Closes [#21189](https://github.com/ClickHouse/ClickHouse/issues/21189). Closes [#21041](https://github.com/ClickHouse/ClickHouse/issues/21041). [#22045](https://github.com/ClickHouse/ClickHouse/pull/22045) ([Omar Bazaraa](https://github.com/OmarBazaraa)). + +#### Experimental Feature + +* Added a compression codec `AES_128_GCM_SIV` which encrypts columns instead of compressing them. [#19896](https://github.com/ClickHouse/ClickHouse/pull/19896) ([PHO](https://github.com/depressed-pho)). Will be rewritten, do not use. +* Rename `MaterializeMySQL` to `MaterializedMySQL`. [#26822](https://github.com/ClickHouse/ClickHouse/pull/26822) ([tavplubix](https://github.com/tavplubix)). + +#### Performance Improvement + +* Improve the performance of fast queries when `max_execution_time = 0` by reducing the number of `clock_gettime` system calls. [#27325](https://github.com/ClickHouse/ClickHouse/pull/27325) ([filimonov](https://github.com/filimonov)). +* Specialize date time related comparison to achieve better performance. This fixes [#27083](https://github.com/ClickHouse/ClickHouse/issues/27083) . [#27122](https://github.com/ClickHouse/ClickHouse/pull/27122) ([Amos Bird](https://github.com/amosbird)). +* Share file descriptors in concurrent reads of the same files. There is no noticeable performance difference on Linux. But the number of opened files will be significantly (10..100 times) lower on typical servers and it makes operations easier. See [#26214](https://github.com/ClickHouse/ClickHouse/issues/26214). [#26768](https://github.com/ClickHouse/ClickHouse/pull/26768) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve latency of short queries, that require reading from tables with large number of columns. [#26371](https://github.com/ClickHouse/ClickHouse/pull/26371) ([Anton Popov](https://github.com/CurtizJ)). +* Don't build sets for indices when analyzing a query. [#26365](https://github.com/ClickHouse/ClickHouse/pull/26365) ([Raúl Marín](https://github.com/Algunenano)). +* Vectorize the SUM of Nullable integer types with native representation ([David Manzanares](https://github.com/davidmanzanares), [Raúl Marín](https://github.com/Algunenano)). [#26248](https://github.com/ClickHouse/ClickHouse/pull/26248) ([Raúl Marín](https://github.com/Algunenano)). +* Compile expressions involving columns with `Enum` types. [#26237](https://github.com/ClickHouse/ClickHouse/pull/26237) ([Maksim Kita](https://github.com/kitaisreal)). +* Compile aggregate functions `groupBitOr`, `groupBitAnd`, `groupBitXor`. [#26161](https://github.com/ClickHouse/ClickHouse/pull/26161) ([Maksim Kita](https://github.com/kitaisreal)). +* Improved memory usage with better block size prediction when reading empty DEFAULT columns. Closes [#17317](https://github.com/ClickHouse/ClickHouse/issues/17317). [#25917](https://github.com/ClickHouse/ClickHouse/pull/25917) ([Vladimir Chebotarev](https://github.com/excitoon)). +* Reduce memory usage and number of read rows in queries with `ORDER BY primary_key`. [#25721](https://github.com/ClickHouse/ClickHouse/pull/25721) ([Anton Popov](https://github.com/CurtizJ)). +* Enable `distributed_push_down_limit` by default. [#27104](https://github.com/ClickHouse/ClickHouse/pull/27104) ([Azat Khuzhin](https://github.com/azat)). +* Make `toTimeZone` monotonicity when timeZone is a constant value to support partition puring when use sql like:. [#26261](https://github.com/ClickHouse/ClickHouse/pull/26261) ([huangzhaowei](https://github.com/SaintBacchus)). + +#### Improvement + +* Mark window functions as ready for general use. Remove the `allow_experimental_window_functions` setting. [#27184](https://github.com/ClickHouse/ClickHouse/pull/27184) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Improve compatibility with non-whole-minute timezone offsets. [#27080](https://github.com/ClickHouse/ClickHouse/pull/27080) ([Raúl Marín](https://github.com/Algunenano)). +* If file descriptor in `File` table is regular file - allow to read multiple times from it. It allows `clickhouse-local` to read multiple times from stdin (with multiple SELECT queries or subqueries) if stdin is a regular file like `clickhouse-local --query "SELECT * FROM table UNION ALL SELECT * FROM table" ... < file`. This closes [#11124](https://github.com/ClickHouse/ClickHouse/issues/11124). Co-authored with ([alexey-milovidov](https://github.com/alexey-milovidov)). [#25960](https://github.com/ClickHouse/ClickHouse/pull/25960) ([BoloniniD](https://github.com/BoloniniD)). +* Remove duplicate index analysis and avoid possible invalid limit checks during projection analysis. [#27742](https://github.com/ClickHouse/ClickHouse/pull/27742) ([Amos Bird](https://github.com/amosbird)). +* Enable query parameters to be passed in the body of HTTP requests. [#27706](https://github.com/ClickHouse/ClickHouse/pull/27706) ([Hermano Lustosa](https://github.com/hllustosa)). +* Disallow `arrayJoin` on partition expressions. [#27648](https://github.com/ClickHouse/ClickHouse/pull/27648) ([Raúl Marín](https://github.com/Algunenano)). +* Log client IP address if authentication fails. [#27514](https://github.com/ClickHouse/ClickHouse/pull/27514) ([Misko Lee](https://github.com/imiskolee)). +* Use bytes instead of strings for binary data in the GRPC protocol. [#27431](https://github.com/ClickHouse/ClickHouse/pull/27431) ([Vitaly Baranov](https://github.com/vitlibar)). +* Send response with error message if HTTP port is not set and user tries to send HTTP request to TCP port. [#27385](https://github.com/ClickHouse/ClickHouse/pull/27385) ([Braulio Valdivielso Martínez](https://github.com/BraulioVM)). +* Add `_CAST` function for internal usage, which will not preserve type nullability, but non-internal cast will preserve according to setting `cast_keep_nullable`. Closes [#12636](https://github.com/ClickHouse/ClickHouse/issues/12636). [#27382](https://github.com/ClickHouse/ClickHouse/pull/27382) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add setting `log_formatted_queries` to log additional formatted query into `system.query_log`. It's useful for normalized query analysis because functions like `normalizeQuery` and `normalizeQueryKeepNames` don't parse/format queries in order to achieve better performance. [#27380](https://github.com/ClickHouse/ClickHouse/pull/27380) ([Amos Bird](https://github.com/amosbird)). +* Add two settings `max_hyperscan_regexp_length` and `max_hyperscan_regexp_total_length` to prevent huge regexp being used in hyperscan related functions, such as `multiMatchAny`. [#27378](https://github.com/ClickHouse/ClickHouse/pull/27378) ([Amos Bird](https://github.com/amosbird)). +* Memory consumed by bitmap aggregate functions now is taken into account for memory limits. This closes [#26555](https://github.com/ClickHouse/ClickHouse/issues/26555). [#27252](https://github.com/ClickHouse/ClickHouse/pull/27252) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add new index data skipping minmax index format for proper Nullable support. [#27250](https://github.com/ClickHouse/ClickHouse/pull/27250) ([Azat Khuzhin](https://github.com/azat)). +* Add 10 seconds cache for S3 proxy resolver. [#27216](https://github.com/ClickHouse/ClickHouse/pull/27216) ([ianton-ru](https://github.com/ianton-ru)). +* Split global mutex into individual regexp construction. This helps avoid huge regexp construction blocking other related threads. [#27211](https://github.com/ClickHouse/ClickHouse/pull/27211) ([Amos Bird](https://github.com/amosbird)). +* Support schema for PostgreSQL database engine. Closes [#27166](https://github.com/ClickHouse/ClickHouse/issues/27166). [#27198](https://github.com/ClickHouse/ClickHouse/pull/27198) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Track memory usage in clickhouse-client. [#27191](https://github.com/ClickHouse/ClickHouse/pull/27191) ([Filatenkov Artur](https://github.com/FArthur-cmd)). +* Try recording `query_kind` in `system.query_log` even when query fails to start. [#27182](https://github.com/ClickHouse/ClickHouse/pull/27182) ([Amos Bird](https://github.com/amosbird)). +* Added columns `replica_is_active` that maps replica name to is replica active status to table `system.replicas`. Closes [#27138](https://github.com/ClickHouse/ClickHouse/issues/27138). [#27180](https://github.com/ClickHouse/ClickHouse/pull/27180) ([Maksim Kita](https://github.com/kitaisreal)). +* Allow to pass query settings via server URI in Web UI. [#27177](https://github.com/ClickHouse/ClickHouse/pull/27177) ([kolsys](https://github.com/kolsys)). +* Add a new metric called `MaxPushedDDLEntryID` which is the maximum ddl entry id that current node push to zookeeper. [#27174](https://github.com/ClickHouse/ClickHouse/pull/27174) ([Fuwang Hu](https://github.com/fuwhu)). +* Improved the existence condition judgment and empty string node judgment when `clickhouse-keeper` creates znode. [#27125](https://github.com/ClickHouse/ClickHouse/pull/27125) ([小路](https://github.com/nicelulu)). +* Merge JOIN correctly handles empty set in the right. [#27078](https://github.com/ClickHouse/ClickHouse/pull/27078) ([Vladimir C](https://github.com/vdimir)). +* Now functions can be shard-level constants, which means if it's executed in the context of some distributed table, it generates a normal column, otherwise it produces a constant value. Notable functions are: `hostName()`, `tcpPort()`, `version()`, `buildId()`, `uptime()`, etc. [#27020](https://github.com/ClickHouse/ClickHouse/pull/27020) ([Amos Bird](https://github.com/amosbird)). +* Updated `extractAllGroupsHorizontal` - upper limit on the number of matches per row can be set via optional third argument. [#26961](https://github.com/ClickHouse/ClickHouse/pull/26961) ([Vasily Nemkov](https://github.com/Enmk)). +* Expose `RocksDB` statistics via system.rocksdb table. Read rocksdb options from ClickHouse config (`rocksdb...` keys). NOTE: ClickHouse does not rely on RocksDB, it is just one of the additional integration storage engines. [#26821](https://github.com/ClickHouse/ClickHouse/pull/26821) ([Azat Khuzhin](https://github.com/azat)). +* Less verbose internal RocksDB logs. NOTE: ClickHouse does not rely on RocksDB, it is just one of the additional integration storage engines. This closes [#26252](https://github.com/ClickHouse/ClickHouse/issues/26252). [#26789](https://github.com/ClickHouse/ClickHouse/pull/26789) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Changing default roles affects new sessions only. [#26759](https://github.com/ClickHouse/ClickHouse/pull/26759) ([Vitaly Baranov](https://github.com/vitlibar)). +* Watchdog is disabled in docker by default. Fix for not handling ctrl+c. [#26757](https://github.com/ClickHouse/ClickHouse/pull/26757) ([Mikhail f. Shiryaev](https://github.com/Felixoid)). +* `SET PROFILE` now applies constraints too if they're set for a passed profile. [#26730](https://github.com/ClickHouse/ClickHouse/pull/26730) ([Vitaly Baranov](https://github.com/vitlibar)). +* Improve handling of `KILL QUERY` requests. [#26675](https://github.com/ClickHouse/ClickHouse/pull/26675) ([Raúl Marín](https://github.com/Algunenano)). +* `mapPopulatesSeries` function supports `Map` type. [#26663](https://github.com/ClickHouse/ClickHouse/pull/26663) ([Ildus Kurbangaliev](https://github.com/ildus)). +* Fix excessive (x2) connect attempts with `skip_unavailable_shards`. [#26658](https://github.com/ClickHouse/ClickHouse/pull/26658) ([Azat Khuzhin](https://github.com/azat)). +* Avoid hanging `clickhouse-benchmark` if connection fails (i.e. on EMFILE). [#26656](https://github.com/ClickHouse/ClickHouse/pull/26656) ([Azat Khuzhin](https://github.com/azat)). +* Allow more threads to be used by the Kafka engine. [#26642](https://github.com/ClickHouse/ClickHouse/pull/26642) ([feihengye](https://github.com/feihengye)). +* Add round-robin support for `clickhouse-benchmark` (it does not differ from the regular multi host/port run except for statistics report). [#26607](https://github.com/ClickHouse/ClickHouse/pull/26607) ([Azat Khuzhin](https://github.com/azat)). +* Executable dictionaries (`executable`, `executable_pool`) enable creation with DDL query using `clickhouse-local`. Closes [#22355](https://github.com/ClickHouse/ClickHouse/issues/22355). [#26510](https://github.com/ClickHouse/ClickHouse/pull/26510) ([Maksim Kita](https://github.com/kitaisreal)). +* Set client query kind for `mysql` and `postgresql` compatibility protocol handlers. [#26498](https://github.com/ClickHouse/ClickHouse/pull/26498) ([anneji-dev](https://github.com/anneji-dev)). +* Apply `LIMIT` on the shards for queries like `SELECT * FROM dist ORDER BY key LIMIT 10` w/ `distributed_push_down_limit=1`. Avoid running `Distinct`/`LIMIT BY` steps for queries like `SELECT DISTINCT shading_key FROM dist ORDER BY key`. Now `distributed_push_down_limit` is respected by `optimize_distributed_group_by_sharding_key` optimization. [#26466](https://github.com/ClickHouse/ClickHouse/pull/26466) ([Azat Khuzhin](https://github.com/azat)). +* Updated protobuf to 3.17.3. Changelogs are available on https://github.com/protocolbuffers/protobuf/releases. [#26424](https://github.com/ClickHouse/ClickHouse/pull/26424) ([Ilya Yatsishin](https://github.com/qoega)). +* Enable `use_hedged_requests` setting that allows to mitigate tail latencies on large clusters. [#26380](https://github.com/ClickHouse/ClickHouse/pull/26380) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Improve behaviour with non-existing host in user allowed host list. [#26368](https://github.com/ClickHouse/ClickHouse/pull/26368) ([ianton-ru](https://github.com/ianton-ru)). +* Add ability to set `Distributed` directory monitor settings via CREATE TABLE (i.e. `CREATE TABLE dist (key Int) Engine=Distributed(cluster, db, table) SETTINGS monitor_batch_inserts=1` and similar). [#26336](https://github.com/ClickHouse/ClickHouse/pull/26336) ([Azat Khuzhin](https://github.com/azat)). +* Save server address in history URLs in web UI if it differs from the origin of web UI. This closes [#26044](https://github.com/ClickHouse/ClickHouse/issues/26044). [#26322](https://github.com/ClickHouse/ClickHouse/pull/26322) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Add events to profile calls to `sleep` / `sleepEachRow`. [#26320](https://github.com/ClickHouse/ClickHouse/pull/26320) ([Raúl Marín](https://github.com/Algunenano)). +* Allow to reuse connections of shards among different clusters. It also avoids creating new connections when using `cluster` table function. [#26318](https://github.com/ClickHouse/ClickHouse/pull/26318) ([Amos Bird](https://github.com/amosbird)). +* Control the execution period of clear old temporary directories by parameter with default value. [#26212](https://github.com/ClickHouse/ClickHouse/issues/26212). [#26313](https://github.com/ClickHouse/ClickHouse/pull/26313) ([fastio](https://github.com/fastio)). +* Add a setting `function_range_max_elements_in_block` to tune the safety threshold for data volume generated by function `range`. This closes [#26303](https://github.com/ClickHouse/ClickHouse/issues/26303). [#26305](https://github.com/ClickHouse/ClickHouse/pull/26305) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check hash function at table creation, not at sampling. Add settings for MergeTree, if someone create a table with incorrect sampling column but sampling never be used, disable this settings for starting the server without exception. [#26256](https://github.com/ClickHouse/ClickHouse/pull/26256) ([zhaoyu](https://github.com/zxc111)). +* Added `output_format_avro_string_column_pattern` setting to put specified String columns to Avro as string instead of default bytes. Implements [#22414](https://github.com/ClickHouse/ClickHouse/issues/22414). [#26245](https://github.com/ClickHouse/ClickHouse/pull/26245) ([Ilya Golshtein](https://github.com/ilejn)). +* Add information about column sizes in `system.columns` table for `Log` and `TinyLog` tables. This closes [#9001](https://github.com/ClickHouse/ClickHouse/issues/9001). [#26241](https://github.com/ClickHouse/ClickHouse/pull/26241) ([Nikolay Degterinsky](https://github.com/evillique)). +* Don't throw exception when querying `system.detached_parts` table if there is custom disk configuration and `detached` directory does not exist on some disks. This closes [#26078](https://github.com/ClickHouse/ClickHouse/issues/26078). [#26236](https://github.com/ClickHouse/ClickHouse/pull/26236) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Check for non-deterministic functions in keys, including constant expressions like `now()`, `today()`. This closes [#25875](https://github.com/ClickHouse/ClickHouse/issues/25875). This closes [#11333](https://github.com/ClickHouse/ClickHouse/issues/11333). [#26235](https://github.com/ClickHouse/ClickHouse/pull/26235) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* convert timestamp and timestamptz data types to `DateTime64` in PostgreSQL table engine. [#26234](https://github.com/ClickHouse/ClickHouse/pull/26234) ([jasine](https://github.com/jasine)). +* Apply aggressive IN index analysis for projections so that better projection candidate can be selected. [#26218](https://github.com/ClickHouse/ClickHouse/pull/26218) ([Amos Bird](https://github.com/amosbird)). +* Remove GLOBAL keyword for IN when scalar function is passed. In previous versions, if user specified `GLOBAL IN f(x)` exception was thrown. [#26217](https://github.com/ClickHouse/ClickHouse/pull/26217) ([Amos Bird](https://github.com/amosbird)). +* Add error id (like `BAD_ARGUMENTS`) to exception messages. This closes [#25862](https://github.com/ClickHouse/ClickHouse/issues/25862). [#26172](https://github.com/ClickHouse/ClickHouse/pull/26172) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix incorrect output with --progress option for clickhouse-local. Progress bar will be cleared once it gets to 100% - same as it is done for clickhouse-client. Closes [#17484](https://github.com/ClickHouse/ClickHouse/issues/17484). [#26128](https://github.com/ClickHouse/ClickHouse/pull/26128) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Add `merge_selecting_sleep_ms` setting. [#26120](https://github.com/ClickHouse/ClickHouse/pull/26120) ([lthaooo](https://github.com/lthaooo)). +* Remove complicated usage of Linux AIO with one block readahead and replace it with plain simple synchronous IO with O_DIRECT. In previous versions, the setting `min_bytes_to_use_direct_io` may not work correctly if `max_threads` is greater than one. Reading with direct IO (that is disabled by default for queries and enabled by default for large merges) will work in less efficient way. This closes [#25997](https://github.com/ClickHouse/ClickHouse/issues/25997). [#26003](https://github.com/ClickHouse/ClickHouse/pull/26003) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Flush `Distributed` table on `REPLACE TABLE` query. Resolves [#24566](https://github.com/ClickHouse/ClickHouse/issues/24566) - Do not replace (or create) table on `[CREATE OR] REPLACE TABLE ... AS SELECT` query if insertion into new table fails. Resolves [#23175](https://github.com/ClickHouse/ClickHouse/issues/23175). [#25895](https://github.com/ClickHouse/ClickHouse/pull/25895) ([tavplubix](https://github.com/tavplubix)). +* Add `views` column to system.query_log containing the names of the (materialized or live) views executed by the query. Adds a new log table (`system.query_views_log`) that contains information about each view executed during a query. Modifies view execution: When an exception is thrown while executing a view, any view that has already startedwill continue running until it finishes. This used to be the behaviour under parallel_view_processing=true and now it's always the same behaviour. - Dependent views now report reading progress to the context. [#25714](https://github.com/ClickHouse/ClickHouse/pull/25714) ([Raúl Marín](https://github.com/Algunenano)). +* Do connection draining asynchonously upon finishing executing distributed queries. A new server setting is added `max_threads_for_connection_collector` which specifies the number of workers to recycle connections in background. If the pool is full, connection will be drained synchronously but a bit different than before: It's drained after we send EOS to client, query will succeed immediately after receiving enough data, and any exception will be logged instead of throwing to the client. Added setting `drain_timeout` (3 seconds by default). Connection draining will disconnect upon timeout. [#25674](https://github.com/ClickHouse/ClickHouse/pull/25674) ([Amos Bird](https://github.com/amosbird)). +* Support for multiple includes in configuration. It is possible to include users configuration, remote servers configuration from multiple sources. Simply place `` element with `from_zk`, `from_env` or `incl` attribute and it will be replaced with the substitution. [#24404](https://github.com/ClickHouse/ClickHouse/pull/24404) ([nvartolomei](https://github.com/nvartolomei)). +* Fix multiple block insertion into distributed table with `insert_distributed_one_random_shard = 1`. This is a marginal feature. Mark as improvement. [#23140](https://github.com/ClickHouse/ClickHouse/pull/23140) ([Amos Bird](https://github.com/amosbird)). +* Support `LowCardinality` and `FixedString` keys/values for `Map` type. [#21543](https://github.com/ClickHouse/ClickHouse/pull/21543) ([hexiaoting](https://github.com/hexiaoting)). +* Enable reloading of local disk config. [#19526](https://github.com/ClickHouse/ClickHouse/pull/19526) ([taiyang-li](https://github.com/taiyang-li)). +* Now KeyConditions can correctly skip nullable keys, including `isNull` and `isNotNull`. https://github.com/ClickHouse/ClickHouse/pull/12433. [#12455](https://github.com/ClickHouse/ClickHouse/pull/12455) ([Amos Bird](https://github.com/amosbird)). + +#### Bug Fix + +* Fix a couple of bugs that may cause replicas to diverge. [#27808](https://github.com/ClickHouse/ClickHouse/pull/27808) ([tavplubix](https://github.com/tavplubix)). +* Fix a rare bug in `DROP PART` which can lead to the error `Unexpected merged part intersects drop range`. [#27807](https://github.com/ClickHouse/ClickHouse/pull/27807) ([alesapin](https://github.com/alesapin)). +* Prevent crashes for some formats when NULL (tombstone) message was coming from Kafka. Closes [#19255](https://github.com/ClickHouse/ClickHouse/issues/19255). [#27794](https://github.com/ClickHouse/ClickHouse/pull/27794) ([filimonov](https://github.com/filimonov)). +* Fix column filtering with union distinct in subquery. Closes [#27578](https://github.com/ClickHouse/ClickHouse/issues/27578). [#27689](https://github.com/ClickHouse/ClickHouse/pull/27689) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix bad type cast when functions like `arrayHas` are applied to arrays of LowCardinality of Nullable of different non-numeric types like `DateTime` and `DateTime64`. In previous versions bad cast occurs. In new version it will lead to exception. This closes [#26330](https://github.com/ClickHouse/ClickHouse/issues/26330). [#27682](https://github.com/ClickHouse/ClickHouse/pull/27682) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix postgresql table function resulting in non-closing connections. Closes [#26088](https://github.com/ClickHouse/ClickHouse/issues/26088). [#27662](https://github.com/ClickHouse/ClickHouse/pull/27662) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fixed another case of `Unexpected merged part ... intersecting drop range ...` error. [#27656](https://github.com/ClickHouse/ClickHouse/pull/27656) ([tavplubix](https://github.com/tavplubix)). +* Fix an error with aliased column in `Distributed` table. [#27652](https://github.com/ClickHouse/ClickHouse/pull/27652) ([Vladimir C](https://github.com/vdimir)). +* After setting `max_memory_usage*` to non-zero value it was not possible to reset it back to 0 (unlimited). It's fixed. [#27638](https://github.com/ClickHouse/ClickHouse/pull/27638) ([tavplubix](https://github.com/tavplubix)). +* Fixed underflow of the time value when constructing it from components. Closes [#27193](https://github.com/ClickHouse/ClickHouse/issues/27193). [#27605](https://github.com/ClickHouse/ClickHouse/pull/27605) ([Vasily Nemkov](https://github.com/Enmk)). +* Fix crash during projection materialization when some parts contain missing columns. This fixes [#27512](https://github.com/ClickHouse/ClickHouse/issues/27512). [#27528](https://github.com/ClickHouse/ClickHouse/pull/27528) ([Amos Bird](https://github.com/amosbird)). +* fix metric `BackgroundMessageBrokerSchedulePoolTask`, maybe mistyped. [#27452](https://github.com/ClickHouse/ClickHouse/pull/27452) ([Ben](https://github.com/benbiti)). +* Fix distributed queries with zero shards and aggregation. [#27427](https://github.com/ClickHouse/ClickHouse/pull/27427) ([Azat Khuzhin](https://github.com/azat)). +* Compatibility when `/proc/meminfo` does not contain KB suffix. [#27361](https://github.com/ClickHouse/ClickHouse/pull/27361) ([Mike Kot](https://github.com/myrrc)). +* Fix incorrect result for query with row-level security, PREWHERE and LowCardinality filter. Fixes [#27179](https://github.com/ClickHouse/ClickHouse/issues/27179). [#27329](https://github.com/ClickHouse/ClickHouse/pull/27329) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fixed incorrect validation of partition id for MergeTree tables that created with old syntax. [#27328](https://github.com/ClickHouse/ClickHouse/pull/27328) ([tavplubix](https://github.com/tavplubix)). +* Fix MySQL protocol when using parallel formats (CSV / TSV). [#27326](https://github.com/ClickHouse/ClickHouse/pull/27326) ([Raúl Marín](https://github.com/Algunenano)). +* Fix `Cannot find column` error for queries with sampling. Was introduced in [#24574](https://github.com/ClickHouse/ClickHouse/issues/24574). Fixes [#26522](https://github.com/ClickHouse/ClickHouse/issues/26522). [#27301](https://github.com/ClickHouse/ClickHouse/pull/27301) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix errors like `Expected ColumnLowCardinality, gotUInt8` or `Bad cast from type DB::ColumnVector to DB::ColumnLowCardinality` for some queries with `LowCardinality` in `PREWHERE`. And more importantly, fix the lack of whitespace in the error message. Fixes [#23515](https://github.com/ClickHouse/ClickHouse/issues/23515). [#27298](https://github.com/ClickHouse/ClickHouse/pull/27298) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix `distributed_group_by_no_merge = 2` with `distributed_push_down_limit = 1` or `optimize_distributed_group_by_sharding_key = 1` with `LIMIT BY` and `LIMIT OFFSET`. [#27249](https://github.com/ClickHouse/ClickHouse/pull/27249) ([Azat Khuzhin](https://github.com/azat)). These are obscure combination of settings that no one is using. +* Fix mutation stuck on invalid partitions in non-replicated MergeTree. [#27248](https://github.com/ClickHouse/ClickHouse/pull/27248) ([Azat Khuzhin](https://github.com/azat)). +* In case of ambiguity, lambda functions prefer its arguments to other aliases or identifiers. [#27235](https://github.com/ClickHouse/ClickHouse/pull/27235) ([Raúl Marín](https://github.com/Algunenano)). +* Fix column structure in merge join, close [#27091](https://github.com/ClickHouse/ClickHouse/issues/27091). [#27217](https://github.com/ClickHouse/ClickHouse/pull/27217) ([Vladimir C](https://github.com/vdimir)). +* In rare cases `system.detached_parts` table might contain incorrect information for some parts, it's fixed. Fixes [#27114](https://github.com/ClickHouse/ClickHouse/issues/27114). [#27183](https://github.com/ClickHouse/ClickHouse/pull/27183) ([tavplubix](https://github.com/tavplubix)). +* Fix uninitialized memory in functions `multiSearch*` with empty array, close [#27169](https://github.com/ClickHouse/ClickHouse/issues/27169). [#27181](https://github.com/ClickHouse/ClickHouse/pull/27181) ([Vladimir C](https://github.com/vdimir)). +* Fix synchronization in GRPCServer. This PR fixes [#27024](https://github.com/ClickHouse/ClickHouse/issues/27024). [#27064](https://github.com/ClickHouse/ClickHouse/pull/27064) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fixed `cache`, `complex_key_cache`, `ssd_cache`, `complex_key_ssd_cache` configuration parsing. Options `allow_read_expired_keys`, `max_update_queue_size`, `update_queue_push_timeout_milliseconds`, `query_wait_timeout_milliseconds` were not parsed for dictionaries with non `cache` type. [#27032](https://github.com/ClickHouse/ClickHouse/pull/27032) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix possible mutation stack due to race with DROP_RANGE. [#27002](https://github.com/ClickHouse/ClickHouse/pull/27002) ([Azat Khuzhin](https://github.com/azat)). +* Now partition ID in queries like `ALTER TABLE ... PARTITION ID xxx` validates for correctness. Fixes [#25718](https://github.com/ClickHouse/ClickHouse/issues/25718). [#26963](https://github.com/ClickHouse/ClickHouse/pull/26963) ([alesapin](https://github.com/alesapin)). +* Fix "Unknown column name" error with multiple JOINs in some cases, close [#26899](https://github.com/ClickHouse/ClickHouse/issues/26899). [#26957](https://github.com/ClickHouse/ClickHouse/pull/26957) ([Vladimir C](https://github.com/vdimir)). +* Fix reading of custom TLDs (stops processing with lower buffer or bigger file). [#26948](https://github.com/ClickHouse/ClickHouse/pull/26948) ([Azat Khuzhin](https://github.com/azat)). +* Fix error `Missing columns: 'xxx'` when `DEFAULT` column references other non materialized column without `DEFAULT` expression. Fixes [#26591](https://github.com/ClickHouse/ClickHouse/issues/26591). [#26900](https://github.com/ClickHouse/ClickHouse/pull/26900) ([alesapin](https://github.com/alesapin)). +* Fix loading of dictionary keys in `library-bridge` for `library` dictionary source. [#26834](https://github.com/ClickHouse/ClickHouse/pull/26834) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Aggregate function parameters might be lost when applying some combinators causing exceptions like `Conversion from AggregateFunction(topKArray, Array(String)) to AggregateFunction(topKArray(10), Array(String)) is not supported`. It's fixed. Fixes [#26196](https://github.com/ClickHouse/ClickHouse/issues/26196) and [#26433](https://github.com/ClickHouse/ClickHouse/issues/26433). [#26814](https://github.com/ClickHouse/ClickHouse/pull/26814) ([tavplubix](https://github.com/tavplubix)). +* Add `event_time_microseconds` value for `REMOVE_PART` in `system.part_log`. In previous versions is was not set. [#26720](https://github.com/ClickHouse/ClickHouse/pull/26720) ([Azat Khuzhin](https://github.com/azat)). +* Do not remove data on ReplicatedMergeTree table shutdown to avoid creating data to metadata inconsistency. [#26716](https://github.com/ClickHouse/ClickHouse/pull/26716) ([nvartolomei](https://github.com/nvartolomei)). +* Sometimes `SET ROLE` could work incorrectly, this PR fixes that. [#26707](https://github.com/ClickHouse/ClickHouse/pull/26707) ([Vitaly Baranov](https://github.com/vitlibar)). +* Some fixes for parallel formatting (https://github.com/ClickHouse/ClickHouse/issues/26694). [#26703](https://github.com/ClickHouse/ClickHouse/pull/26703) ([Raúl Marín](https://github.com/Algunenano)). +* Fix potential nullptr dereference in window functions. This fixes [#25276](https://github.com/ClickHouse/ClickHouse/issues/25276). [#26668](https://github.com/ClickHouse/ClickHouse/pull/26668) ([Alexander Kuzmenkov](https://github.com/akuzm)). +* Fix clickhouse-client history file conversion (when upgrading from the format of 3 years old version of clickhouse-client) if file is empty. [#26589](https://github.com/ClickHouse/ClickHouse/pull/26589) ([Azat Khuzhin](https://github.com/azat)). +* Fix incorrect function names of groupBitmapAnd/Or/Xor (can be displayed in some occasions). This fixes. [#26557](https://github.com/ClickHouse/ClickHouse/pull/26557) ([Amos Bird](https://github.com/amosbird)). +* Update `chown` cmd check in clickhouse-server docker entrypoint. It fixes the bug that cluster pod restart failed (or timeout) on kubernetes. [#26545](https://github.com/ClickHouse/ClickHouse/pull/26545) ([Ky Li](https://github.com/Kylinrix)). +* Fix crash in `RabbitMQ` shutdown in case `RabbitMQ` setup was not started. Closes [#26504](https://github.com/ClickHouse/ClickHouse/issues/26504). [#26529](https://github.com/ClickHouse/ClickHouse/pull/26529) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix issues with `CREATE DICTIONARY` query if dictionary name or database name was quoted. Closes [#26491](https://github.com/ClickHouse/ClickHouse/issues/26491). [#26508](https://github.com/ClickHouse/ClickHouse/pull/26508) ([Maksim Kita](https://github.com/kitaisreal)). +* Fix broken column name resolution after rewriting column aliases. This fixes [#26432](https://github.com/ClickHouse/ClickHouse/issues/26432). [#26475](https://github.com/ClickHouse/ClickHouse/pull/26475) ([Amos Bird](https://github.com/amosbird)). +* Fix some fuzzed msan crash. Fixes [#22517](https://github.com/ClickHouse/ClickHouse/issues/22517). [#26428](https://github.com/ClickHouse/ClickHouse/pull/26428) ([Nikolai Kochetov](https://github.com/KochetovNicolai)). +* Fix infinite non joined block stream in `partial_merge_join` close [#26325](https://github.com/ClickHouse/ClickHouse/issues/26325). [#26374](https://github.com/ClickHouse/ClickHouse/pull/26374) ([Vladimir C](https://github.com/vdimir)). +* Fix possible crash when login as dropped user. This PR fixes [#26073](https://github.com/ClickHouse/ClickHouse/issues/26073). [#26363](https://github.com/ClickHouse/ClickHouse/pull/26363) ([Vitaly Baranov](https://github.com/vitlibar)). +* Fix `optimize_distributed_group_by_sharding_key` for multiple columns (leads to incorrect result w/ `optimize_skip_unused_shards=1`/`allow_nondeterministic_optimize_skip_unused_shards=1` and multiple columns in sharding key expression). [#26353](https://github.com/ClickHouse/ClickHouse/pull/26353) ([Azat Khuzhin](https://github.com/azat)). +* Fixed rare bug in lost replica recovery that may cause replicas to diverge. [#26321](https://github.com/ClickHouse/ClickHouse/pull/26321) ([tavplubix](https://github.com/tavplubix)). +* Fix zstd decompression (for import/export in zstd framing format that is unrelated to tables data) in case there are escape sequences at the end of internal buffer. Closes [#26013](https://github.com/ClickHouse/ClickHouse/issues/26013). [#26314](https://github.com/ClickHouse/ClickHouse/pull/26314) ([Kseniia Sumarokova](https://github.com/kssenii)). +* Fix logical error on join with totals, close [#26017](https://github.com/ClickHouse/ClickHouse/issues/26017). [#26250](https://github.com/ClickHouse/ClickHouse/pull/26250) ([Vladimir C](https://github.com/vdimir)). +* Remove excessive newline in `thread_name` column in `system.stack_trace` table. This fixes [#24124](https://github.com/ClickHouse/ClickHouse/issues/24124). [#26210](https://github.com/ClickHouse/ClickHouse/pull/26210) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix potential crash if more than one `untuple` expression is used. [#26179](https://github.com/ClickHouse/ClickHouse/pull/26179) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Don't throw exception in `toString` for Nullable Enum if Enum does not have a value for zero, close [#25806](https://github.com/ClickHouse/ClickHouse/issues/25806). [#26123](https://github.com/ClickHouse/ClickHouse/pull/26123) ([Vladimir C](https://github.com/vdimir)). +* Fixed incorrect `sequence_id` in MySQL protocol packets that ClickHouse sends on exception during query execution. It might cause MySQL client to reset connection to ClickHouse server. Fixes [#21184](https://github.com/ClickHouse/ClickHouse/issues/21184). [#26051](https://github.com/ClickHouse/ClickHouse/pull/26051) ([tavplubix](https://github.com/tavplubix)). +* Fix for the case that `cutToFirstSignificantSubdomainCustom()`/`cutToFirstSignificantSubdomainCustomWithWWW()`/`firstSignificantSubdomainCustom()` returns incorrect type for consts, and hence `optimize_skip_unused_shards` does not work:. [#26041](https://github.com/ClickHouse/ClickHouse/pull/26041) ([Azat Khuzhin](https://github.com/azat)). +* Fix possible mismatched header when using normal projection with prewhere. This fixes [#26020](https://github.com/ClickHouse/ClickHouse/issues/26020). [#26038](https://github.com/ClickHouse/ClickHouse/pull/26038) ([Amos Bird](https://github.com/amosbird)). +* Fix sharding_key from column w/o function for remote() (before `select * from remote('127.1', system.one, dummy)` leads to `Unknown column: dummy, there are only columns .` error). [#25824](https://github.com/ClickHouse/ClickHouse/pull/25824) ([Azat Khuzhin](https://github.com/azat)). +* Fixed `Not found column ...` and `Missing column ...` errors when selecting from `MaterializeMySQL`. Fixes [#23708](https://github.com/ClickHouse/ClickHouse/issues/23708), [#24830](https://github.com/ClickHouse/ClickHouse/issues/24830), [#25794](https://github.com/ClickHouse/ClickHouse/issues/25794). [#25822](https://github.com/ClickHouse/ClickHouse/pull/25822) ([tavplubix](https://github.com/tavplubix)). +* Fix `optimize_skip_unused_shards_rewrite_in` for non-UInt64 types (may select incorrect shards eventually or throw `Cannot infer type of an empty tuple` or `Function tuple requires at least one argument`). [#25798](https://github.com/ClickHouse/ClickHouse/pull/25798) ([Azat Khuzhin](https://github.com/azat)). + +#### Build/Testing/Packaging Improvement + +* Now we ran stateful and stateless tests in random timezones. Fixes [#12439](https://github.com/ClickHouse/ClickHouse/issues/12439). Reading String as DateTime and writing DateTime as String in Protobuf format now respect timezone. Reading UInt16 as DateTime in Arrow and Parquet formats now treat it as Date and then converts to DateTime with respect to DateTime's timezone, because Date is serialized in Arrow and Parquet as UInt16. GraphiteMergeTree now respect time zone for rounding of times. Fixes [#5098](https://github.com/ClickHouse/ClickHouse/issues/5098). Author: @alexey-milovidov. [#15408](https://github.com/ClickHouse/ClickHouse/pull/15408) ([alesapin](https://github.com/alesapin)). +* `clickhouse-test` supports SQL tests with [Jinja2](https://jinja.palletsprojects.com/en/3.0.x/templates/#synopsis) templates. [#26579](https://github.com/ClickHouse/ClickHouse/pull/26579) ([Vladimir C](https://github.com/vdimir)). +* Add support for build with `clang-13`. This closes [#27705](https://github.com/ClickHouse/ClickHouse/issues/27705). [#27714](https://github.com/ClickHouse/ClickHouse/pull/27714) ([alexey-milovidov](https://github.com/alexey-milovidov)). [#27777](https://github.com/ClickHouse/ClickHouse/pull/27777) ([Sergei Semin](https://github.com/syominsergey)) +* Add CMake options to build with or without specific CPU instruction set. This is for [#17469](https://github.com/ClickHouse/ClickHouse/issues/17469) and [#27509](https://github.com/ClickHouse/ClickHouse/issues/27509). [#27508](https://github.com/ClickHouse/ClickHouse/pull/27508) ([alexey-milovidov](https://github.com/alexey-milovidov)). +* Fix linking of auxiliar programs when using dynamic libraries. [#26958](https://github.com/ClickHouse/ClickHouse/pull/26958) ([Raúl Marín](https://github.com/Algunenano)). +* Update RocksDB to `2021-07-16` master. [#26411](https://github.com/ClickHouse/ClickHouse/pull/26411) ([alexey-milovidov](https://github.com/alexey-milovidov)). + + ### ClickHouse release v21.8, 2021-08-12 #### Upgrade Notes @@ -1145,7 +1355,7 @@ * Export current max ddl entry executed by DDLWorker via server metric. It's useful to check if DDLWorker hangs somewhere. [#17464](https://github.com/ClickHouse/ClickHouse/pull/17464) ([Amos Bird](https://github.com/amosbird)). * Export asynchronous metrics of all servers current threads. It's useful to track down issues like [this](https://github.com/ClickHouse-Extras/poco/pull/28). [#17463](https://github.com/ClickHouse/ClickHouse/pull/17463) ([Amos Bird](https://github.com/amosbird)). * Include dynamic columns like MATERIALIZED / ALIAS for wildcard query when settings `asterisk_include_materialized_columns` and `asterisk_include_alias_columns` are turned on. [#17462](https://github.com/ClickHouse/ClickHouse/pull/17462) ([Ken Chen](https://github.com/chenziliang)). -* Allow specifying [TTL](https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/mergetree/#mergetree-table-ttl) to remove old entries from [system log tables](https://clickhouse.tech/docs/en/operations/system-tables/), using the `` attribute in `config.xml`. [#17438](https://github.com/ClickHouse/ClickHouse/pull/17438) ([Du Chuan](https://github.com/spongedu)). +* Allow specifying [TTL](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#mergetree-table-ttl) to remove old entries from [system log tables](https://clickhouse.com/docs/en/operations/system-tables/), using the `` attribute in `config.xml`. [#17438](https://github.com/ClickHouse/ClickHouse/pull/17438) ([Du Chuan](https://github.com/spongedu)). * Now queries coming to the server via MySQL and PostgreSQL protocols have distinctive interface types (which can be seen in the `interface` column of the table`system.query_log`): `4` for MySQL, and `5` for PostgreSQL, instead of formerly used `1` which is now used for the native protocol only. [#17437](https://github.com/ClickHouse/ClickHouse/pull/17437) ([Vitaly Baranov](https://github.com/vitlibar)). * Fix parsing of SETTINGS clause of the `INSERT ... SELECT ... SETTINGS` query. [#17414](https://github.com/ClickHouse/ClickHouse/pull/17414) ([Azat Khuzhin](https://github.com/azat)). * Correctly account memory in RadixSort. [#17412](https://github.com/ClickHouse/ClickHouse/pull/17412) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)). diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aef8c9fc8d..e4227735549 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.14) foreach(policy CMP0023 @@ -45,6 +45,7 @@ include (cmake/arch.cmake) include (cmake/target.cmake) include (cmake/tools.cmake) include (cmake/analysis.cmake) +include (cmake/git_status.cmake) # Ignore export() since we don't use it, # but it gets broken with a global targets via link_libraries() @@ -79,16 +80,16 @@ include (cmake/find/ccache.cmake) # ccache ignore it. option(ENABLE_CHECK_HEAVY_BUILDS "Don't allow C++ translation units to compile too long or to take too much memory while compiling." OFF) if (ENABLE_CHECK_HEAVY_BUILDS) - # set DATA (since RSS does not work since 2.6.x+) to 2G + # set DATA (since RSS does not work since 2.6.x+) to 5G set (RLIMIT_DATA 5000000000) # set VIRT (RLIMIT_AS) to 10G (DATA*10) set (RLIMIT_AS 10000000000) - # set CPU time limit to 600 seconds - set (RLIMIT_CPU 600) + # set CPU time limit to 1000 seconds + set (RLIMIT_CPU 1000) # gcc10/gcc10/clang -fsanitize=memory is too heavy if (SANITIZE STREQUAL "memory" OR COMPILER_GCC) - set (RLIMIT_DATA 10000000000) + set (RLIMIT_DATA 10000000000) # 10G endif() set (CMAKE_CXX_COMPILER_LAUNCHER prlimit --as=${RLIMIT_AS} --data=${RLIMIT_DATA} --cpu=${RLIMIT_CPU} ${CMAKE_CXX_COMPILER_LAUNCHER}) @@ -126,12 +127,13 @@ if (USE_STATIC_LIBRARIES) list(REVERSE CMAKE_FIND_LIBRARY_SUFFIXES) endif () -# Implies ${WITH_COVERAGE} option (ENABLE_FUZZING "Fuzzy testing using libfuzzer" OFF) if (ENABLE_FUZZING) + # Also set WITH_COVERAGE=1 for better fuzzing process + # By default this is disabled, because fuzzers are built in CI with the clickhouse itself. + # And we don't want to enable coverage for it. message (STATUS "Fuzzing instrumentation enabled") - set (WITH_COVERAGE ON) set (FUZZER "libfuzzer") endif() @@ -150,6 +152,7 @@ if (CMAKE_GENERATOR STREQUAL "Ninja" AND NOT DISABLE_COLORED_BUILD) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-color=always") endif () +include (cmake/check_flags.cmake) include (cmake/add_warning.cmake) if (NOT MSVC) @@ -163,6 +166,14 @@ if (COMPILER_CLANG) if (NOT CMAKE_BUILD_TYPE_UC STREQUAL "RELEASE") set(COMPILER_FLAGS "${COMPILER_FLAGS} -gdwarf-aranges") endif () + + if (HAS_USE_CTOR_HOMING) + # For more info see https://blog.llvm.org/posts/2021-04-05-constructor-homing-for-debug-info/ + if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE_UC STREQUAL "RELWITHDEBINFO") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fuse-ctor-homing") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xclang -fuse-ctor-homing") + endif() + endif() endif () # If turned `ON`, assumes the user has either the system GTest library or the bundled one. @@ -176,6 +187,14 @@ elseif(GLIBC_COMPATIBILITY) message (${RECONFIGURE_MESSAGE_LEVEL} "Glibc compatibility cannot be enabled in current configuration") endif () +if (GLIBC_COMPATIBILITY) + # NOTE: we may also want to check glibc version and add -include only for 2.32+ + # however this is extra complexity, especially for cross compiling. + # And anyway it should not break anything for <2.32. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/base/glibc-compatibility/glibc-compat-2.32.h") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -include ${CMAKE_CURRENT_SOURCE_DIR}/base/glibc-compatibility/glibc-compat-2.32.h") +endif() + if (NOT CMAKE_VERSION VERSION_GREATER "3.9.0") message (WARNING "CMake version must be greater than 3.9.0 for production builds.") endif () @@ -183,7 +202,7 @@ endif () # Make sure the final executable has symbols exported set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic") -find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-12" "llvm-objcopy-11" "llvm-objcopy-10" "llvm-objcopy-9" "llvm-objcopy-8" "objcopy") +find_program (OBJCOPY_PATH NAMES "llvm-objcopy" "llvm-objcopy-13" "llvm-objcopy-12" "llvm-objcopy-11" "llvm-objcopy-10" "llvm-objcopy-9" "llvm-objcopy-8" "objcopy") if (NOT OBJCOPY_PATH AND OS_DARWIN) find_program (BREW_PATH NAMES "brew") @@ -370,7 +389,7 @@ if (COMPILER_CLANG) endif () # Always prefer llvm tools when using clang. For instance, we cannot use GNU ar when llvm LTO is enabled - find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8") + find_program (LLVM_AR_PATH NAMES "llvm-ar" "llvm-ar-13" "llvm-ar-12" "llvm-ar-11" "llvm-ar-10" "llvm-ar-9" "llvm-ar-8") if (LLVM_AR_PATH) message(STATUS "Using llvm-ar: ${LLVM_AR_PATH}.") @@ -379,7 +398,7 @@ if (COMPILER_CLANG) message(WARNING "Cannot find llvm-ar. System ar will be used instead. It does not work with ThinLTO.") endif () - find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9" "llvm-ranlib-8") + find_program (LLVM_RANLIB_PATH NAMES "llvm-ranlib" "llvm-ranlib-13" "llvm-ranlib-12" "llvm-ranlib-11" "llvm-ranlib-10" "llvm-ranlib-9" "llvm-ranlib-8") if (LLVM_RANLIB_PATH) message(STATUS "Using llvm-ranlib: ${LLVM_RANLIB_PATH}.") @@ -620,9 +639,6 @@ include_directories(${ConfigIncludePath}) # Add as many warnings as possible for our own code. include (cmake/warnings.cmake) -# Check if needed compiler flags are supported -include (cmake/check_flags.cmake) - add_subdirectory (base) add_subdirectory (src) add_subdirectory (programs) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e16957b759d..8628d7a01fd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,38 +6,6 @@ Thank you. ## Technical Info -We have a [developer's guide](https://clickhouse.yandex/docs/en/development/developer_instruction/) for writing code for ClickHouse. Besides this guide, you can find [Overview of ClickHouse Architecture](https://clickhouse.yandex/docs/en/development/architecture/) and instructions on how to build ClickHouse in different environments. +We have a [developer's guide](https://clickhouse.com/docs/en/development/developer_instruction/) for writing code for ClickHouse. Besides this guide, you can find [Overview of ClickHouse Architecture](https://clickhouse.com/docs/en/development/architecture/) and instructions on how to build ClickHouse in different environments. If you want to contribute to documentation, read the [Contributing to ClickHouse Documentation](docs/README.md) guide. - -## Legal Info - -In order for us (YANDEX LLC) to accept patches and other contributions from you, you may adopt our Yandex Contributor License Agreement (the "**CLA**"). The current version of the CLA you may find here: -1) https://yandex.ru/legal/cla/?lang=en (in English) and -2) https://yandex.ru/legal/cla/?lang=ru (in Russian). - -By adopting the CLA, you state the following: - -* You obviously wish and are willingly licensing your contributions to us for our open source projects under the terms of the CLA, -* You have read the terms and conditions of the CLA and agree with them in full, -* You are legally able to provide and license your contributions as stated, -* We may use your contributions for our open source projects and for any other our project too, -* We rely on your assurances concerning the rights of third parties in relation to your contributions. - -If you agree with these principles, please read and adopt our CLA. By providing us your contributions, you hereby declare that you have already read and adopt our CLA, and we may freely merge your contributions with our corresponding open source project and use it in further in accordance with terms and conditions of the CLA. - -If you have already adopted terms and conditions of the CLA, you are able to provide your contributes. When you submit your pull request, please add the following information into it: - -``` -I hereby agree to the terms of the CLA available at: [link]. -``` - -Replace the bracketed text as follows: -* [link] is the link at the current version of the CLA (you may add here a link https://yandex.ru/legal/cla/?lang=en (in English) or a link https://yandex.ru/legal/cla/?lang=ru (in Russian). - -It is enough to provide us such notification once. - -As an alternative, you can provide DCO instead of CLA. You can find the text of DCO here: https://developercertificate.org/ -It is enough to read and copy it verbatim to your pull request. - -If you don't agree with the CLA and don't want to provide DCO, you still can open a pull request to provide your contributions. diff --git a/LICENSE b/LICENSE index 9167b80e269..c46bc7d19e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2016-2021 Yandex LLC +Copyright 2016-2021 ClickHouse, Inc. Apache License Version 2.0, January 2004 diff --git a/README.md b/README.md index 178547ea523..55254028198 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,14 @@ -[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/ClickHouse/raw/master/website/images/logo-400x240.png)](https://clickhouse.tech) +[![ClickHouse — open source distributed column-oriented DBMS](https://github.com/ClickHouse/ClickHouse/raw/master/website/images/logo-400x240.png)](https://clickhouse.com) ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real time. ## Useful Links -* [Official website](https://clickhouse.tech/) has quick high-level overview of ClickHouse on main page. -* [Tutorial](https://clickhouse.tech/docs/en/getting_started/tutorial/) shows how to set up and query small ClickHouse cluster. -* [Documentation](https://clickhouse.tech/docs/en/) provides more in-depth information. +* [Official website](https://clickhouse.com/) has quick high-level overview of ClickHouse on main page. +* [Tutorial](https://clickhouse.com/docs/en/getting_started/tutorial/) shows how to set up and query small ClickHouse cluster. +* [Documentation](https://clickhouse.com/docs/en/) provides more in-depth information. * [YouTube channel](https://www.youtube.com/c/ClickHouseDB) has a lot of content about ClickHouse in video format. * [Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-rxm3rdrk-lIUmhLC3V8WTaL0TGxsOmg) and [Telegram](https://telegram.me/clickhouse_en) allow to chat with ClickHouse users in real-time. -* [Blog](https://clickhouse.yandex/blog/en/) contains various ClickHouse-related articles, as well as announcements and reports about events. -* [Code Browser](https://clickhouse.tech/codebrowser/html_report/ClickHouse/index.html) with syntax highlight and navigation. -* [Contacts](https://clickhouse.tech/#contacts) can help to get your questions answered if there are any. -* You can also [fill this form](https://clickhouse.tech/#meet) to meet Yandex ClickHouse team in person. - -## Upcoming Events -* [SF Bay Area ClickHouse August Community Meetup (online)](https://www.meetup.com/San-Francisco-Bay-Area-ClickHouse-Meetup/events/279109379/) on 25 August 2021. +* [Blog](https://clickhouse.com/blog/en/) contains various ClickHouse-related articles, as well as announcements and reports about events. +* [Code Browser](https://clickhouse.com/codebrowser/html_report/ClickHouse/index.html) with syntax highlight and navigation. +* [Contacts](https://clickhouse.com/#contacts) can help to get your questions answered if there are any. diff --git a/SECURITY.md b/SECURITY.md index 906b2966348..235e86a5d40 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,9 +1,11 @@ # Security Policy -## Supported Versions +## Security Announcements +Security fixes will be announced by posting them in the [security changelog](https://clickhouse.com/docs/en/whats-new/security-changelog/) -The following versions of ClickHouse server are -currently being supported with security updates: +## Scope and Supported Versions + +The following versions of ClickHouse server are currently being supported with security updates: | Version | Supported | | ------- | ------------------ | @@ -11,18 +13,50 @@ currently being supported with security updates: | 18.x | :x: | | 19.x | :x: | | 20.1 | :x: | -| 20.3 | :white_check_mark: | +| 20.3 | :x: | | 20.4 | :x: | | 20.5 | :x: | | 20.6 | :x: | | 20.7 | :x: | -| 20.8 | :white_check_mark: | +| 20.8 | :x: | | 20.9 | :x: | | 20.10 | :x: | -| 20.11 | :white_check_mark: | -| 20.12 | :white_check_mark: | -| 21.1 | :white_check_mark: | +| 20.11 | :x: | +| 20.12 | :x: | +| 21.1 | :x: | +| 21.2 | :x: | +| 21.3 | ✅ | +| 21.4 | :x: | +| 21.5 | :x: | +| 21.6 | :x: | +| 21.7 | ✅ | +| 21.8 | ✅ | +| 21.9 | ✅ | ## Reporting a Vulnerability -To report a potential vulnerability in ClickHouse please send the details about it to [clickhouse-feedback@yandex-team.com](mailto:clickhouse-feedback@yandex-team.com). +We're extremely grateful for security researchers and users that report vulnerabilities to the ClickHouse Open Source Community. All reports are thoroughly investigated by developers. + +To report a potential vulnerability in ClickHouse please send the details about it to [security@clickhouse.com](mailto:security@clickhouse.com). + +### When Should I Report a Vulnerability? + +- You think you discovered a potential security vulnerability in ClickHouse +- You are unsure how a vulnerability affects ClickHouse + +### When Should I NOT Report a Vulnerability? + +- You need help tuning ClickHouse components for security +- You need help applying security related updates +- Your issue is not security related + +## Security Vulnerability Response + +Each report is acknowledged and analyzed by ClickHouse maintainers within 5 working days. +As the security issue moves from triage, to identified fix, to release planning we will keep the reporter updated. + +## Public Disclosure Timing + +A public disclosure date is negotiated by the ClickHouse maintainers and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available. It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination. The timeframe for disclosure is from immediate (especially if it's already publicly known) to 90 days. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days. + + diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 023dcaaccae..452b483fb6a 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -2,7 +2,7 @@ if (USE_CLANG_TIDY) set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}") endif () -add_subdirectory (common) +add_subdirectory (base) add_subdirectory (daemon) add_subdirectory (loggers) add_subdirectory (pcg-random) diff --git a/base/common/BorrowedObjectPool.h b/base/base/BorrowedObjectPool.h similarity index 97% rename from base/common/BorrowedObjectPool.h rename to base/base/BorrowedObjectPool.h index 6a90a7e7122..98a8b16ef8d 100644 --- a/base/common/BorrowedObjectPool.h +++ b/base/base/BorrowedObjectPool.h @@ -6,8 +6,8 @@ #include #include -#include -#include +#include +#include /** Pool for limited size objects that cannot be used from different threads simultaneously. * The main use case is to have fixed size of objects that can be reused in difference threads during their lifetime @@ -88,7 +88,7 @@ public: /// Return object into pool. Client must return same object that was borrowed. inline void returnObject(T && object_to_return) { - std::unique_lock lck(objects_mutex); + std::unique_lock lock(objects_mutex); objects.emplace_back(std::move(object_to_return)); --borrowed_objects_size; diff --git a/base/common/CMakeLists.txt b/base/base/CMakeLists.txt similarity index 99% rename from base/common/CMakeLists.txt rename to base/base/CMakeLists.txt index e5e18669ebe..202a2dff56f 100644 --- a/base/common/CMakeLists.txt +++ b/base/base/CMakeLists.txt @@ -85,6 +85,7 @@ target_link_libraries (common replxx cctz fmt + magic_enum ) if (ENABLE_TESTS) diff --git a/base/base/CachedFn.h b/base/base/CachedFn.h new file mode 100644 index 00000000000..83e02073e1d --- /dev/null +++ b/base/base/CachedFn.h @@ -0,0 +1,73 @@ +#pragma once + +#include +#include +#include "FnTraits.h" + +/** + * Caching proxy for a functor that decays to a pointer-to-function. + * Saves pairs (func args, func result on args). + * Cache size is unlimited. Cache items are evicted only on manual drop. + * Invocation/update is O(log(saved cache values)). + * + * See Common/tests/cached_fn.cpp for examples. + */ +template +struct CachedFn +{ +private: + using Traits = FnTraits; + using Key = typename Traits::DecayedArgs; + using Result = typename Traits::Ret; + + std::map cache; // Can't use hashmap as tuples are unhashable by default + mutable std::mutex mutex; + +public: + template + Result operator()(Args && ...args) + { + Key key{std::forward(args)...}; + + { + std::lock_guard lock(mutex); + + if (auto it = cache.find(key); it != cache.end()) + return it->second; + } + + Result res = std::apply(Func, key); + + { + std::lock_guard lock(mutex); + cache.emplace(std::move(key), res); + } + + return res; + } + + template + void update(Args && ...args) + { + Key key{std::forward(args)...}; + Result res = std::apply(Func, key); + + { + std::lock_guard lock(mutex); + // TODO Can't use emplace(std::move(key), ..), causes test_host_ip_change errors. + cache[key] = std::move(res); + } + } + + size_t size() const + { + std::lock_guard lock(mutex); + return cache.size(); + } + + void drop() + { + std::lock_guard lock(mutex); + cache.clear(); + } +}; diff --git a/base/common/DateLUT.cpp b/base/base/DateLUT.cpp similarity index 100% rename from base/common/DateLUT.cpp rename to base/base/DateLUT.cpp diff --git a/base/common/DateLUT.h b/base/base/DateLUT.h similarity index 100% rename from base/common/DateLUT.h rename to base/base/DateLUT.h diff --git a/base/common/DateLUTImpl.cpp b/base/base/DateLUTImpl.cpp similarity index 99% rename from base/common/DateLUTImpl.cpp rename to base/base/DateLUTImpl.cpp index 472f24f3805..09ed0b1495d 100644 --- a/base/common/DateLUTImpl.cpp +++ b/base/base/DateLUTImpl.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/base/common/DateLUTImpl.h b/base/base/DateLUTImpl.h similarity index 100% rename from base/common/DateLUTImpl.h rename to base/base/DateLUTImpl.h diff --git a/base/common/DayNum.h b/base/base/DayNum.h similarity index 82% rename from base/common/DayNum.h rename to base/base/DayNum.h index 5cf4d4635c8..b707579ca0a 100644 --- a/base/common/DayNum.h +++ b/base/base/DayNum.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include /** Represents number of days since 1970-01-01. * See DateLUTImpl for usage examples. diff --git a/base/base/Decimal.h b/base/base/Decimal.h new file mode 100644 index 00000000000..aefe852b749 --- /dev/null +++ b/base/base/Decimal.h @@ -0,0 +1,157 @@ +#pragma once +#include + +#if !defined(NO_SANITIZE_UNDEFINED) +#if defined(__clang__) + #define NO_SANITIZE_UNDEFINED __attribute__((__no_sanitize__("undefined"))) +#else + #define NO_SANITIZE_UNDEFINED +#endif +#endif + +namespace DB +{ +template struct Decimal; +class DateTime64; + +using Decimal32 = Decimal; +using Decimal64 = Decimal; +using Decimal128 = Decimal; +using Decimal256 = Decimal; + +template +concept is_decimal = + std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v; + +template +concept is_over_big_int = + std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v; + +template struct NativeTypeT { using Type = T; }; +template struct NativeTypeT { using Type = typename T::NativeType; }; +template using NativeType = typename NativeTypeT::Type; + +/// Own FieldType for Decimal. +/// It is only a "storage" for decimal. +/// To perform operations, you also have to provide a scale (number of digits after point). +template +struct Decimal +{ + using NativeType = T; + + constexpr Decimal() = default; + constexpr Decimal(Decimal &&) = default; + constexpr Decimal(const Decimal &) = default; + + constexpr Decimal(const T & value_): value(value_) {} + + template + constexpr Decimal(const Decimal & x): value(x.value) {} + + constexpr Decimal & operator = (Decimal &&) = default; + constexpr Decimal & operator = (const Decimal &) = default; + + constexpr operator T () const { return value; } + + template + constexpr U convertTo() const + { + if constexpr (is_decimal) + return convertTo(); + else + return static_cast(value); + } + + const Decimal & operator += (const T & x) { value += x; return *this; } + const Decimal & operator -= (const T & x) { value -= x; return *this; } + const Decimal & operator *= (const T & x) { value *= x; return *this; } + const Decimal & operator /= (const T & x) { value /= x; return *this; } + const Decimal & operator %= (const T & x) { value %= x; return *this; } + + template const Decimal & operator += (const Decimal & x) { value += x.value; return *this; } + template const Decimal & operator -= (const Decimal & x) { value -= x.value; return *this; } + template const Decimal & operator *= (const Decimal & x) { value *= x.value; return *this; } + template const Decimal & operator /= (const Decimal & x) { value /= x.value; return *this; } + template const Decimal & operator %= (const Decimal & x) { value %= x.value; return *this; } + + /// This is to avoid UB for sumWithOverflow() + void NO_SANITIZE_UNDEFINED addOverflow(const T & x) { value += x; } + + T value; +}; + +template inline bool operator< (const Decimal & x, const Decimal & y) { return x.value < y.value; } +template inline bool operator> (const Decimal & x, const Decimal & y) { return x.value > y.value; } +template inline bool operator<= (const Decimal & x, const Decimal & y) { return x.value <= y.value; } +template inline bool operator>= (const Decimal & x, const Decimal & y) { return x.value >= y.value; } +template inline bool operator== (const Decimal & x, const Decimal & y) { return x.value == y.value; } +template inline bool operator!= (const Decimal & x, const Decimal & y) { return x.value != y.value; } + +template inline Decimal operator+ (const Decimal & x, const Decimal & y) { return x.value + y.value; } +template inline Decimal operator- (const Decimal & x, const Decimal & y) { return x.value - y.value; } +template inline Decimal operator* (const Decimal & x, const Decimal & y) { return x.value * y.value; } +template inline Decimal operator/ (const Decimal & x, const Decimal & y) { return x.value / y.value; } +template inline Decimal operator- (const Decimal & x) { return -x.value; } + +/// Distinguishable type to allow function resolution/deduction based on value type, +/// but also relatively easy to convert to/from Decimal64. +class DateTime64 : public Decimal64 +{ +public: + using Base = Decimal64; + using Base::Base; + using NativeType = Base::NativeType; + + constexpr DateTime64(const Base & v): Base(v) {} +}; +} + +constexpr DB::UInt64 max_uint_mask = std::numeric_limits::max(); + +namespace std +{ + template + struct hash> + { + size_t operator()(const DB::Decimal & x) const { return hash()(x.value); } + }; + + template <> + struct hash + { + size_t operator()(const DB::Decimal128 & x) const + { + return std::hash()(x.value >> 64) + ^ std::hash()(x.value & max_uint_mask); + } + }; + + template <> + struct hash + { + size_t operator()(const DB::DateTime64 & x) const + { + return std::hash()(x); + } + }; + + template <> + struct hash + { + size_t operator()(const DB::Decimal256 & x) const + { + // FIXME temp solution + return std::hash()(static_cast(x.value >> 64 & max_uint_mask)) + ^ std::hash()(static_cast(x.value & max_uint_mask)); + } + }; +} diff --git a/base/common/DecomposedFloat.h b/base/base/DecomposedFloat.h similarity index 99% rename from base/common/DecomposedFloat.h rename to base/base/DecomposedFloat.h index 21034908fe7..652b28966b2 100644 --- a/base/common/DecomposedFloat.h +++ b/base/base/DecomposedFloat.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include /// Allows to check the internals of IEEE-754 floating point number. diff --git a/base/base/EnumReflection.h b/base/base/EnumReflection.h new file mode 100644 index 00000000000..0d1f8ae0a40 --- /dev/null +++ b/base/base/EnumReflection.h @@ -0,0 +1,38 @@ +#pragma once + +#include +#include + +template concept is_enum = std::is_enum_v; + +namespace detail +{ +template +constexpr void static_for(F && f, std::index_sequence) +{ + (std::forward(f)(std::integral_constant(I)>()) , ...); +} +} + +/** + * Iterate over enum values in compile-time (compile-time switch/case, loop unrolling). + * + * @example static_for([](auto enum_value) { return template_func(); } + * ^ enum_value can be used as a template parameter + */ +template +constexpr void static_for(F && f) +{ + constexpr size_t count = magic_enum::enum_count(); + detail::static_for(std::forward(f), std::make_index_sequence()); +} + +/// Enable printing enum values as strings via fmt + magic_enum +template +struct fmt::formatter : fmt::formatter +{ + constexpr auto format(T value, auto& format_context) + { + return formatter::format(magic_enum::enum_name(value), format_context); + } +}; diff --git a/base/common/ErrorHandlers.h b/base/base/ErrorHandlers.h similarity index 96% rename from base/common/ErrorHandlers.h rename to base/base/ErrorHandlers.h index 67194ee043b..bce92cad458 100644 --- a/base/common/ErrorHandlers.h +++ b/base/base/ErrorHandlers.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include diff --git a/base/base/FnTraits.h b/base/base/FnTraits.h new file mode 100644 index 00000000000..d90cb530a09 --- /dev/null +++ b/base/base/FnTraits.h @@ -0,0 +1,37 @@ +#pragma once + +#include +#include +#include + +namespace detail +{ +template +struct FnTraits { template static constexpr bool value = false; }; + +template +struct FnTraits +{ + template + static constexpr bool value = std::is_invocable_r_v; + + using Ret = R; + using Args = std::tuple; + using DecayedArgs = std::tuple::type...>; +}; + +template +struct FnTraits : FnTraits {}; +} + +template using FnTraits = detail::FnTraits; + +/** + * A less-typing alias for std::is_invokable_r_v. + * @example void foo(Fn auto && functor) + */ +template +concept Fn = FnTraits::template value; + +template +using Constant = std::integral_constant; diff --git a/base/common/FunctorToStaticMethodAdaptor.h b/base/base/FunctorToStaticMethodAdaptor.h similarity index 100% rename from base/common/FunctorToStaticMethodAdaptor.h rename to base/base/FunctorToStaticMethodAdaptor.h diff --git a/base/common/JSON.cpp b/base/base/JSON.cpp similarity index 99% rename from base/common/JSON.cpp rename to base/base/JSON.cpp index 9823591a2b6..bf65e6d455b 100644 --- a/base/common/JSON.cpp +++ b/base/base/JSON.cpp @@ -3,9 +3,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include diff --git a/base/common/JSON.h b/base/base/JSON.h similarity index 99% rename from base/common/JSON.h rename to base/base/JSON.h index 7039036eeb3..5965b2b17a9 100644 --- a/base/common/JSON.h +++ b/base/base/JSON.h @@ -2,8 +2,8 @@ #include #include -#include -#include +#include +#include /** Очень простой класс для чтения JSON (или его кусочков). diff --git a/base/common/LineReader.cpp b/base/base/LineReader.cpp similarity index 97% rename from base/common/LineReader.cpp rename to base/base/LineReader.cpp index a32906dd5a5..c2786892aeb 100644 --- a/base/common/LineReader.cpp +++ b/base/base/LineReader.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -16,6 +16,10 @@ extern "C" } #endif +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + namespace { diff --git a/base/common/LineReader.h b/base/base/LineReader.h similarity index 98% rename from base/common/LineReader.h rename to base/base/LineReader.h index 159a93ce40d..0e36a9e01d1 100644 --- a/base/common/LineReader.h +++ b/base/base/LineReader.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/base/common/LocalDate.h b/base/base/LocalDate.h similarity index 99% rename from base/common/LocalDate.h rename to base/base/LocalDate.h index 484847e1ff4..d199b9dbb4b 100644 --- a/base/common/LocalDate.h +++ b/base/base/LocalDate.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include /** Stores a calendar date in broken-down form (year, month, day-in-month). diff --git a/base/common/LocalDateTime.h b/base/base/LocalDateTime.h similarity index 98% rename from base/common/LocalDateTime.h rename to base/base/LocalDateTime.h index dde283e5ebb..0edc12374bb 100644 --- a/base/common/LocalDateTime.h +++ b/base/base/LocalDateTime.h @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include +#include /** Stores calendar date and time in broken-down form. diff --git a/base/common/MoveOrCopyIfThrow.h b/base/base/MoveOrCopyIfThrow.h similarity index 96% rename from base/common/MoveOrCopyIfThrow.h rename to base/base/MoveOrCopyIfThrow.h index caa1b51e2bc..d826bcb3d34 100644 --- a/base/common/MoveOrCopyIfThrow.h +++ b/base/base/MoveOrCopyIfThrow.h @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace detail { diff --git a/base/common/ReadlineLineReader.cpp b/base/base/ReadlineLineReader.cpp similarity index 98% rename from base/common/ReadlineLineReader.cpp rename to base/base/ReadlineLineReader.cpp index f2c2b60f327..de444a0b1d9 100644 --- a/base/common/ReadlineLineReader.cpp +++ b/base/base/ReadlineLineReader.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include +#include +#include #include #include diff --git a/base/common/ReadlineLineReader.h b/base/base/ReadlineLineReader.h similarity index 100% rename from base/common/ReadlineLineReader.h rename to base/base/ReadlineLineReader.h diff --git a/base/common/ReplxxLineReader.cpp b/base/base/ReplxxLineReader.cpp similarity index 99% rename from base/common/ReplxxLineReader.cpp rename to base/base/ReplxxLineReader.cpp index c79013f1850..9bf6ec41255 100644 --- a/base/common/ReplxxLineReader.cpp +++ b/base/base/ReplxxLineReader.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include diff --git a/base/common/ReplxxLineReader.h b/base/base/ReplxxLineReader.h similarity index 100% rename from base/common/ReplxxLineReader.h rename to base/base/ReplxxLineReader.h diff --git a/base/common/StringRef.cpp b/base/base/StringRef.cpp similarity index 100% rename from base/common/StringRef.cpp rename to base/base/StringRef.cpp diff --git a/base/common/StringRef.h b/base/base/StringRef.h similarity index 83% rename from base/common/StringRef.h rename to base/base/StringRef.h index ac9d7c47b72..d0184dbc24c 100644 --- a/base/common/StringRef.h +++ b/base/base/StringRef.h @@ -7,8 +7,8 @@ #include #include -#include -#include +#include +#include #include @@ -96,6 +96,39 @@ inline bool compareSSE2x4(const char * p1, const char * p2) inline bool memequalSSE2Wide(const char * p1, const char * p2, size_t size) { + /** The order of branches and the trick with overlapping comparisons + * are the same as in memcpy implementation. + * See the comments in base/glibc-compatibility/memcpy/memcpy.h + */ + + if (size <= 16) + { + if (size >= 8) + { + /// Chunks of 8..16 bytes. + return unalignedLoad(p1) == unalignedLoad(p2) + && unalignedLoad(p1 + size - 8) == unalignedLoad(p2 + size - 8); + } + else if (size >= 4) + { + /// Chunks of 4..7 bytes. + return unalignedLoad(p1) == unalignedLoad(p2) + && unalignedLoad(p1 + size - 4) == unalignedLoad(p2 + size - 4); + } + else if (size >= 2) + { + /// Chunks of 2..3 bytes. + return unalignedLoad(p1) == unalignedLoad(p2) + && unalignedLoad(p1 + size - 2) == unalignedLoad(p2 + size - 2); + } + else if (size >= 1) + { + /// A single byte. + return *p1 == *p2; + } + return true; + } + while (size >= 64) { if (compareSSE2x4(p1, p2)) @@ -108,39 +141,14 @@ inline bool memequalSSE2Wide(const char * p1, const char * p2, size_t size) return false; } - switch ((size % 64) / 16) + switch (size / 16) { case 3: if (!compareSSE2(p1 + 32, p2 + 32)) return false; [[fallthrough]]; case 2: if (!compareSSE2(p1 + 16, p2 + 16)) return false; [[fallthrough]]; - case 1: if (!compareSSE2(p1 , p2 )) return false; [[fallthrough]]; - case 0: break; + case 1: if (!compareSSE2(p1, p2)) return false; } - p1 += (size % 64) / 16 * 16; - p2 += (size % 64) / 16 * 16; - - switch (size % 16) - { - case 15: if (p1[14] != p2[14]) return false; [[fallthrough]]; - case 14: if (p1[13] != p2[13]) return false; [[fallthrough]]; - case 13: if (p1[12] != p2[12]) return false; [[fallthrough]]; - case 12: if (unalignedLoad(p1 + 8) == unalignedLoad(p2 + 8)) goto l8; else return false; - case 11: if (p1[10] != p2[10]) return false; [[fallthrough]]; - case 10: if (p1[9] != p2[9]) return false; [[fallthrough]]; - case 9: if (p1[8] != p2[8]) return false; - l8: [[fallthrough]]; - case 8: return unalignedLoad(p1) == unalignedLoad(p2); - case 7: if (p1[6] != p2[6]) return false; [[fallthrough]]; - case 6: if (p1[5] != p2[5]) return false; [[fallthrough]]; - case 5: if (p1[4] != p2[4]) return false; [[fallthrough]]; - case 4: return unalignedLoad(p1) == unalignedLoad(p2); - case 3: if (p1[2] != p2[2]) return false; [[fallthrough]]; - case 2: return unalignedLoad(p1) == unalignedLoad(p2); - case 1: if (p1[0] != p2[0]) return false; [[fallthrough]]; - case 0: break; - } - - return true; + return compareSSE2(p1 + size - 16, p2 + size - 16); } #endif diff --git a/base/common/argsToConfig.cpp b/base/base/argsToConfig.cpp similarity index 100% rename from base/common/argsToConfig.cpp rename to base/base/argsToConfig.cpp diff --git a/base/common/argsToConfig.h b/base/base/argsToConfig.h similarity index 100% rename from base/common/argsToConfig.h rename to base/base/argsToConfig.h diff --git a/base/common/arithmeticOverflow.h b/base/base/arithmeticOverflow.h similarity index 91% rename from base/common/arithmeticOverflow.h rename to base/base/arithmeticOverflow.h index 175e75a62f4..9a0e27505e1 100644 --- a/base/common/arithmeticOverflow.h +++ b/base/base/arithmeticOverflow.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include namespace common @@ -145,6 +145,19 @@ namespace common return __builtin_mul_overflow(x, y, &res); } + template + inline bool mulOverflow(T x, U y, R & res) + { + // not built in type, wide integer + if constexpr (is_big_int_v || is_big_int_v || is_big_int_v) + { + res = mulIgnoreOverflow(x, y); + return false; + } + else + return __builtin_mul_overflow(x, y, &res); + } + template <> inline bool mulOverflow(int x, int y, int & res) { diff --git a/base/common/arraySize.h b/base/base/arraySize.h similarity index 100% rename from base/common/arraySize.h rename to base/base/arraySize.h diff --git a/base/common/bit_cast.h b/base/base/bit_cast.h similarity index 100% rename from base/common/bit_cast.h rename to base/base/bit_cast.h diff --git a/base/common/chrono_io.h b/base/base/chrono_io.h similarity index 100% rename from base/common/chrono_io.h rename to base/base/chrono_io.h diff --git a/base/common/constexpr_helpers.h b/base/base/constexpr_helpers.h similarity index 100% rename from base/common/constexpr_helpers.h rename to base/base/constexpr_helpers.h diff --git a/base/common/coverage.cpp b/base/base/coverage.cpp similarity index 100% rename from base/common/coverage.cpp rename to base/base/coverage.cpp diff --git a/base/common/coverage.h b/base/base/coverage.h similarity index 100% rename from base/common/coverage.h rename to base/base/coverage.h diff --git a/base/common/defines.h b/base/base/defines.h similarity index 99% rename from base/common/defines.h rename to base/base/defines.h index ada8245f494..7c64bced81c 100644 --- a/base/common/defines.h +++ b/base/base/defines.h @@ -8,7 +8,7 @@ /// NOTE: /// - __has_feature cannot be simply undefined, /// since this will be broken if some C++ header will be included after -/// including +/// including /// - it should not have fallback to 0, /// since this may create false-positive detection (common problem) #if defined(__clang__) && defined(__has_feature) diff --git a/base/common/demangle.cpp b/base/base/demangle.cpp similarity index 96% rename from base/common/demangle.cpp rename to base/base/demangle.cpp index d7fac7c6990..97906293bca 100644 --- a/base/common/demangle.cpp +++ b/base/base/demangle.cpp @@ -1,4 +1,4 @@ -#include +#include #if defined(_MSC_VER) diff --git a/base/common/demangle.h b/base/base/demangle.h similarity index 100% rename from base/common/demangle.h rename to base/base/demangle.h diff --git a/base/common/errnoToString.cpp b/base/base/errnoToString.cpp similarity index 100% rename from base/common/errnoToString.cpp rename to base/base/errnoToString.cpp diff --git a/base/common/errnoToString.h b/base/base/errnoToString.h similarity index 100% rename from base/common/errnoToString.h rename to base/base/errnoToString.h diff --git a/base/common/extended_types.h b/base/base/extended_types.h similarity index 83% rename from base/common/extended_types.h rename to base/base/extended_types.h index 79209568ef5..7deb8e17b8e 100644 --- a/base/common/extended_types.h +++ b/base/base/extended_types.h @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include using Int128 = wide::integer<128, signed>; @@ -41,22 +41,14 @@ template <> struct is_unsigned { static constexpr bool value = true; }; template inline constexpr bool is_unsigned_v = is_unsigned::value; +template concept is_integer = + std::is_integral_v + || std::is_same_v + || std::is_same_v + || std::is_same_v + || std::is_same_v; -/// TODO: is_integral includes char, char8_t and wchar_t. -template -struct is_integer -{ - static constexpr bool value = std::is_integral_v; -}; - -template <> struct is_integer { static constexpr bool value = true; }; -template <> struct is_integer { static constexpr bool value = true; }; -template <> struct is_integer { static constexpr bool value = true; }; -template <> struct is_integer { static constexpr bool value = true; }; - -template -inline constexpr bool is_integer_v = is_integer::value; - +template concept is_floating_point = std::is_floating_point_v; template struct is_arithmetic diff --git a/base/common/find_symbols.h b/base/base/find_symbols.h similarity index 90% rename from base/common/find_symbols.h rename to base/base/find_symbols.h index a5921b813a1..b28749afda6 100644 --- a/base/common/find_symbols.h +++ b/base/base/find_symbols.h @@ -36,18 +36,7 @@ namespace detail { - -template -inline bool is_in(char x) -{ - return x == s0; -} - -template -inline bool is_in(char x) -{ - return x == s0 || is_in(x); -} +template constexpr bool is_in(char x) { return ((x == chars) || ...); } #if defined(__SSE2__) template @@ -67,16 +56,10 @@ inline __m128i mm_is_in(__m128i bytes) #endif template -bool maybe_negate(bool x) -{ - if constexpr (positive) - return x; - else - return !x; -} +constexpr bool maybe_negate(bool x) { return x == positive; } template -uint16_t maybe_negate(uint16_t x) +constexpr uint16_t maybe_negate(uint16_t x) { if constexpr (positive) return x; @@ -149,12 +132,13 @@ template -inline const char * find_first_symbols_sse42_impl(const char * const begin, const char * const end) +inline const char * find_first_symbols_sse42(const char * const begin, const char * const end) { const char * pos = begin; #if defined(__SSE4_2__) -#define MODE (_SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT) + constexpr int mode = _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT; + __m128i set = _mm_setr_epi8(c01, c02, c03, c04, c05, c06, c07, c08, c09, c10, c11, c12, c13, c14, c15, c16); for (; pos + 15 < end; pos += 16) @@ -163,16 +147,15 @@ inline const char * find_first_symbols_sse42_impl(const char * const begin, cons if constexpr (positive) { - if (_mm_cmpestrc(set, num_chars, bytes, 16, MODE)) - return pos + _mm_cmpestri(set, num_chars, bytes, 16, MODE); + if (_mm_cmpestrc(set, num_chars, bytes, 16, mode)) + return pos + _mm_cmpestri(set, num_chars, bytes, 16, mode); } else { - if (_mm_cmpestrc(set, num_chars, bytes, 16, MODE | _SIDD_NEGATIVE_POLARITY)) - return pos + _mm_cmpestri(set, num_chars, bytes, 16, MODE | _SIDD_NEGATIVE_POLARITY); + if (_mm_cmpestrc(set, num_chars, bytes, 16, mode | _SIDD_NEGATIVE_POLARITY)) + return pos + _mm_cmpestri(set, num_chars, bytes, 16, mode | _SIDD_NEGATIVE_POLARITY); } } -#undef MODE #endif for (; pos < end; ++pos) @@ -197,20 +180,15 @@ inline const char * find_first_symbols_sse42_impl(const char * const begin, cons } -template -inline const char * find_first_symbols_sse42(const char * begin, const char * end) -{ - return find_first_symbols_sse42_impl(begin, end); -} - /// NOTE No SSE 4.2 implementation for find_last_symbols_or_null. Not worth to do. template inline const char * find_first_symbols_dispatch(const char * begin, const char * end) + requires(0 <= sizeof...(symbols) && sizeof...(symbols) <= 16) { #if defined(__SSE4_2__) if (sizeof...(symbols) >= 5) - return find_first_symbols_sse42(begin, end); + return find_first_symbols_sse42(begin, end); else #endif return find_first_symbols_sse2(begin, end); diff --git a/base/common/getFQDNOrHostName.cpp b/base/base/getFQDNOrHostName.cpp similarity index 91% rename from base/common/getFQDNOrHostName.cpp rename to base/base/getFQDNOrHostName.cpp index f67b37bd71c..2a4ba8e2e11 100644 --- a/base/common/getFQDNOrHostName.cpp +++ b/base/base/getFQDNOrHostName.cpp @@ -1,5 +1,5 @@ #include -#include +#include namespace diff --git a/base/common/getFQDNOrHostName.h b/base/base/getFQDNOrHostName.h similarity index 100% rename from base/common/getFQDNOrHostName.h rename to base/base/getFQDNOrHostName.h diff --git a/base/common/getMemoryAmount.cpp b/base/base/getMemoryAmount.cpp similarity index 90% rename from base/common/getMemoryAmount.cpp rename to base/base/getMemoryAmount.cpp index 1f1b2b8c5dd..59ad10335ed 100644 --- a/base/common/getMemoryAmount.cpp +++ b/base/base/getMemoryAmount.cpp @@ -1,6 +1,6 @@ #include -#include "common/getMemoryAmount.h" -#include "common/getPageSize.h" +#include +#include #include #include diff --git a/base/common/getMemoryAmount.h b/base/base/getMemoryAmount.h similarity index 100% rename from base/common/getMemoryAmount.h rename to base/base/getMemoryAmount.h diff --git a/base/common/getPageSize.cpp b/base/base/getPageSize.cpp similarity index 71% rename from base/common/getPageSize.cpp rename to base/base/getPageSize.cpp index e96149cc1fb..6f7e0c6e259 100644 --- a/base/common/getPageSize.cpp +++ b/base/base/getPageSize.cpp @@ -1,7 +1,7 @@ -#include "common/getPageSize.h" - +#include #include + Int64 getPageSize() { return sysconf(_SC_PAGESIZE); diff --git a/base/common/getPageSize.h b/base/base/getPageSize.h similarity index 70% rename from base/common/getPageSize.h rename to base/base/getPageSize.h index 8a35acbfe9b..ce9fc740713 100644 --- a/base/common/getPageSize.h +++ b/base/base/getPageSize.h @@ -1,6 +1,7 @@ #pragma once -#include "common/types.h" +#include + /// Get memory page size Int64 getPageSize(); diff --git a/base/common/getResource.cpp b/base/base/getResource.cpp similarity index 100% rename from base/common/getResource.cpp rename to base/base/getResource.cpp diff --git a/base/common/getResource.h b/base/base/getResource.h similarity index 100% rename from base/common/getResource.h rename to base/base/getResource.h diff --git a/base/common/getThreadId.cpp b/base/base/getThreadId.cpp similarity index 96% rename from base/common/getThreadId.cpp rename to base/base/getThreadId.cpp index 054e9be9074..21167b19d32 100644 --- a/base/common/getThreadId.cpp +++ b/base/base/getThreadId.cpp @@ -1,4 +1,4 @@ -#include +#include #if defined(OS_ANDROID) #include diff --git a/base/common/getThreadId.h b/base/base/getThreadId.h similarity index 100% rename from base/common/getThreadId.h rename to base/base/getThreadId.h diff --git a/base/base/insertAtEnd.h b/base/base/insertAtEnd.h new file mode 100644 index 00000000000..c4fef664511 --- /dev/null +++ b/base/base/insertAtEnd.h @@ -0,0 +1,28 @@ +#pragma once + +#include + +/// Appends a specified vector with elements of another vector. +template +void insertAtEnd(std::vector & dest, const std::vector & src) +{ + if (src.empty()) + return; + dest.reserve(dest.size() + src.size()); + dest.insert(dest.end(), src.begin(), src.end()); +} + +template +void insertAtEnd(std::vector & dest, std::vector && src) +{ + if (src.empty()) + return; + if (dest.empty()) + { + dest.swap(src); + return; + } + dest.reserve(dest.size() + src.size()); + dest.insert(dest.end(), std::make_move_iterator(src.begin()), std::make_move_iterator(src.end())); + src.clear(); +} diff --git a/base/common/iostream_debug_helpers.h b/base/base/iostream_debug_helpers.h similarity index 100% rename from base/common/iostream_debug_helpers.h rename to base/base/iostream_debug_helpers.h diff --git a/base/common/itoa.h b/base/base/itoa.h similarity index 99% rename from base/common/itoa.h rename to base/base/itoa.h index 4c86239de36..da7c2ffc73e 100644 --- a/base/common/itoa.h +++ b/base/base/itoa.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include namespace impl diff --git a/base/common/logger_useful.h b/base/base/logger_useful.h similarity index 96% rename from base/common/logger_useful.h rename to base/base/logger_useful.h index d3b4d38d546..e2290a727b4 100644 --- a/base/common/logger_useful.h +++ b/base/base/logger_useful.h @@ -42,6 +42,7 @@ namespace } while (false) +#define LOG_TEST(logger, ...) LOG_IMPL(logger, DB::LogsLevel::test, Poco::Message::PRIO_TEST, __VA_ARGS__) #define LOG_TRACE(logger, ...) LOG_IMPL(logger, DB::LogsLevel::trace, Poco::Message::PRIO_TRACE, __VA_ARGS__) #define LOG_DEBUG(logger, ...) LOG_IMPL(logger, DB::LogsLevel::debug, Poco::Message::PRIO_DEBUG, __VA_ARGS__) #define LOG_INFO(logger, ...) LOG_IMPL(logger, DB::LogsLevel::information, Poco::Message::PRIO_INFORMATION, __VA_ARGS__) diff --git a/base/common/map.h b/base/base/map.h similarity index 100% rename from base/common/map.h rename to base/base/map.h diff --git a/base/common/mremap.cpp b/base/base/mremap.cpp similarity index 96% rename from base/common/mremap.cpp rename to base/base/mremap.cpp index d2d8d7fde4f..ebf6c6e0249 100644 --- a/base/common/mremap.cpp +++ b/base/base/mremap.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/base/common/mremap.h b/base/base/mremap.h similarity index 100% rename from base/common/mremap.h rename to base/base/mremap.h diff --git a/base/common/phdr_cache.cpp b/base/base/phdr_cache.cpp similarity index 95% rename from base/common/phdr_cache.cpp rename to base/base/phdr_cache.cpp index 49d566dac19..a642bb7cd59 100644 --- a/base/common/phdr_cache.cpp +++ b/base/base/phdr_cache.cpp @@ -1,6 +1,10 @@ +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + /// This code was based on the code by Fedor Korotkiy (prime@yandex-team.ru) for YT product in Yandex. -#include +#include #if defined(__linux__) && !defined(THREAD_SANITIZER) #define USE_PHDR_CACHE 1 diff --git a/base/common/phdr_cache.h b/base/base/phdr_cache.h similarity index 100% rename from base/common/phdr_cache.h rename to base/base/phdr_cache.h diff --git a/base/common/preciseExp10.cpp b/base/base/preciseExp10.cpp similarity index 100% rename from base/common/preciseExp10.cpp rename to base/base/preciseExp10.cpp diff --git a/base/common/preciseExp10.h b/base/base/preciseExp10.h similarity index 100% rename from base/common/preciseExp10.h rename to base/base/preciseExp10.h diff --git a/base/common/range.h b/base/base/range.h similarity index 100% rename from base/common/range.h rename to base/base/range.h diff --git a/base/common/removeDuplicates.h b/base/base/removeDuplicates.h similarity index 100% rename from base/common/removeDuplicates.h rename to base/base/removeDuplicates.h diff --git a/base/common/scope_guard.h b/base/base/scope_guard.h similarity index 100% rename from base/common/scope_guard.h rename to base/base/scope_guard.h diff --git a/base/common/scope_guard_safe.h b/base/base/scope_guard_safe.h similarity index 97% rename from base/common/scope_guard_safe.h rename to base/base/scope_guard_safe.h index a52b4a14f48..73c85b65b57 100644 --- a/base/common/scope_guard_safe.h +++ b/base/base/scope_guard_safe.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include /// Same as SCOPE_EXIT() but block the MEMORY_LIMIT_EXCEEDED errors. diff --git a/base/common/setTerminalEcho.cpp b/base/base/setTerminalEcho.cpp similarity index 90% rename from base/common/setTerminalEcho.cpp rename to base/base/setTerminalEcho.cpp index 66db216a235..2f478f10933 100644 --- a/base/common/setTerminalEcho.cpp +++ b/base/base/setTerminalEcho.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include diff --git a/base/common/setTerminalEcho.h b/base/base/setTerminalEcho.h similarity index 100% rename from base/common/setTerminalEcho.h rename to base/base/setTerminalEcho.h diff --git a/base/common/shared_ptr_helper.h b/base/base/shared_ptr_helper.h similarity index 100% rename from base/common/shared_ptr_helper.h rename to base/base/shared_ptr_helper.h diff --git a/base/common/shift10.cpp b/base/base/shift10.cpp similarity index 99% rename from base/common/shift10.cpp rename to base/base/shift10.cpp index b7b39182145..db2f4a6963e 100644 --- a/base/common/shift10.cpp +++ b/base/base/shift10.cpp @@ -1,4 +1,4 @@ -#include +#include #include "defines.h" diff --git a/base/common/shift10.h b/base/base/shift10.h similarity index 93% rename from base/common/shift10.h rename to base/base/shift10.h index c50121cfb27..0f54d1f2988 100644 --- a/base/common/shift10.h +++ b/base/base/shift10.h @@ -1,6 +1,6 @@ #pragma once -#include +#include /** Almost the same as x = x * exp10(exponent), but gives more accurate result. * Example: diff --git a/base/common/sleep.cpp b/base/base/sleep.cpp similarity index 98% rename from base/common/sleep.cpp rename to base/base/sleep.cpp index 85bbc8edfcc..88cb53556cd 100644 --- a/base/common/sleep.cpp +++ b/base/base/sleep.cpp @@ -1,4 +1,4 @@ -#include "common/sleep.h" +#include #include #include diff --git a/base/common/sleep.h b/base/base/sleep.h similarity index 100% rename from base/common/sleep.h rename to base/base/sleep.h diff --git a/base/common/sort.h b/base/base/sort.h similarity index 100% rename from base/common/sort.h rename to base/base/sort.h diff --git a/base/common/strong_typedef.h b/base/base/strong_typedef.h similarity index 85% rename from base/common/strong_typedef.h rename to base/base/strong_typedef.h index a1e2b253aa7..0c2e9ca7e8e 100644 --- a/base/common/strong_typedef.h +++ b/base/base/strong_typedef.h @@ -15,15 +15,15 @@ private: public: using UnderlyingType = T; template ::type> - explicit StrongTypedef(const T & t_) : t(t_) {} + constexpr explicit StrongTypedef(const T & t_) : t(t_) {} template ::type> - explicit StrongTypedef(T && t_) : t(std::move(t_)) {} + constexpr explicit StrongTypedef(T && t_) : t(std::move(t_)) {} template ::type> - StrongTypedef(): t() {} + constexpr StrongTypedef(): t() {} - StrongTypedef(const Self &) = default; - StrongTypedef(Self &&) = default; + constexpr StrongTypedef(const Self &) = default; + constexpr StrongTypedef(Self &&) = default; Self & operator=(const Self &) = default; Self & operator=(Self &&) = default; diff --git a/base/common/terminalColors.cpp b/base/base/terminalColors.cpp similarity index 97% rename from base/common/terminalColors.cpp rename to base/base/terminalColors.cpp index af1f02d331f..4c2013c6499 100644 --- a/base/common/terminalColors.cpp +++ b/base/base/terminalColors.cpp @@ -1,5 +1,5 @@ #include -#include +#include std::string setColor(UInt64 hash) diff --git a/base/common/terminalColors.h b/base/base/terminalColors.h similarity index 94% rename from base/common/terminalColors.h rename to base/base/terminalColors.h index 9de9693bca7..971c2b9efb0 100644 --- a/base/common/terminalColors.h +++ b/base/base/terminalColors.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include /** Set color in terminal based on 64-bit hash value. diff --git a/base/common/tests/CMakeLists.txt b/base/base/tests/CMakeLists.txt similarity index 100% rename from base/common/tests/CMakeLists.txt rename to base/base/tests/CMakeLists.txt diff --git a/base/common/tests/dump_variable.cpp b/base/base/tests/dump_variable.cpp similarity index 96% rename from base/common/tests/dump_variable.cpp rename to base/base/tests/dump_variable.cpp index 17d2f9f69ec..9addc298ecb 100644 --- a/base/common/tests/dump_variable.cpp +++ b/base/base/tests/dump_variable.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/base/common/throwError.h b/base/base/throwError.h similarity index 100% rename from base/common/throwError.h rename to base/base/throwError.h diff --git a/base/common/time.h b/base/base/time.h similarity index 100% rename from base/common/time.h rename to base/base/time.h diff --git a/base/common/types.h b/base/base/types.h similarity index 100% rename from base/common/types.h rename to base/base/types.h diff --git a/base/common/unaligned.h b/base/base/unaligned.h similarity index 100% rename from base/common/unaligned.h rename to base/base/unaligned.h diff --git a/base/base/unit.h b/base/base/unit.h new file mode 100644 index 00000000000..5bf5e00c049 --- /dev/null +++ b/base/base/unit.h @@ -0,0 +1,14 @@ +#pragma once +#include + +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + +constexpr size_t KiB = 1024; +constexpr size_t MiB = 1024 * KiB; +constexpr size_t GiB = 1024 * MiB; + +constexpr size_t operator"" _KiB(unsigned long long val) { return val * KiB; } +constexpr size_t operator"" _MiB(unsigned long long val) { return val * MiB; } +constexpr size_t operator"" _GiB(unsigned long long val) { return val * GiB; } diff --git a/base/common/wide_integer.h b/base/base/wide_integer.h similarity index 100% rename from base/common/wide_integer.h rename to base/base/wide_integer.h diff --git a/base/common/wide_integer_impl.h b/base/base/wide_integer_impl.h similarity index 97% rename from base/common/wide_integer_impl.h rename to base/base/wide_integer_impl.h index 27efe18eedd..b8de5efb859 100644 --- a/base/common/wide_integer_impl.h +++ b/base/base/wide_integer_impl.h @@ -9,6 +9,7 @@ #include #include #include +#include #include @@ -39,6 +40,18 @@ static constexpr bool IntegralConcept() noexcept return std::is_integral_v || IsWideInteger::value; } +template +class IsTupleLike +{ + template + static auto check(U * p) -> decltype(std::tuple_size::value, int()); + template + static void check(...); + +public: + static constexpr const bool value = !std::is_void(nullptr))>::value; +}; + } namespace std @@ -227,6 +240,19 @@ struct integer::_impl self.items[i] = 0; } + template + constexpr static void wide_integer_from_tuple_like(integer & self, const TupleLike & tuple) noexcept + { + if constexpr (i < item_count) + { + if constexpr (i < std::tuple_size_v) + self.items[i] = std::get(tuple); + else + self.items[i] = 0; + wide_integer_from_tuple_like(self, tuple); + } + } + /** * N.B. t is constructed from double, so max(t) = max(double) ~ 2^310 * the recursive call happens when t / 2^64 > 2^64, so there won't be more than 5 of them. @@ -966,6 +992,8 @@ constexpr integer::integer(T rhs) noexcept { if constexpr (IsWideInteger::value) _impl::wide_integer_from_wide_integer(*this, rhs); + else if constexpr (IsTupleLike::value) + _impl::wide_integer_from_tuple_like(*this, rhs); else _impl::wide_integer_from_builtin(*this, rhs); } @@ -979,6 +1007,8 @@ constexpr integer::integer(std::initializer_list il) noexcept { if constexpr (IsWideInteger::value) _impl::wide_integer_from_wide_integer(*this, *il.begin()); + else if constexpr (IsTupleLike::value) + _impl::wide_integer_from_tuple_like(*this, *il.begin()); else _impl::wide_integer_from_builtin(*this, *il.begin()); } @@ -1007,7 +1037,10 @@ template template constexpr integer & integer::operator=(T rhs) noexcept { - _impl::wide_integer_from_builtin(*this, rhs); + if constexpr (IsTupleLike::value) + _impl::wide_integer_from_tuple_like(*this, rhs); + else + _impl::wide_integer_from_builtin(*this, rhs); return *this; } diff --git a/base/common/wide_integer_to_string.h b/base/base/wide_integer_to_string.h similarity index 100% rename from base/common/wide_integer_to_string.h rename to base/base/wide_integer_to_string.h diff --git a/base/bridge/IBridge.cpp b/base/bridge/IBridge.cpp index 35a9b95c97f..553973b645d 100644 --- a/base/bridge/IBridge.cpp +++ b/base/bridge/IBridge.cpp @@ -4,12 +4,12 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include diff --git a/base/common/SimpleCache.h b/base/common/SimpleCache.h deleted file mode 100644 index c3bf019c226..00000000000 --- a/base/common/SimpleCache.h +++ /dev/null @@ -1,82 +0,0 @@ -#pragma once - -#include -#include -#include -#include - - -/** The simplest cache for a free function. - * You can also pass a static class method or lambda without captures. - * The size is unlimited. Values are stored permanently and never evicted. - * But single record or all cache can be manually dropped. - * Mutex is used for synchronization. - * Suitable only for the simplest cases. - * - * Usage - * - * SimpleCache func_cached; - * std::cerr << func_cached(args...); - */ -template -class SimpleCache -{ -private: - using Key = typename function_traits::arguments_decay; - using Result = typename function_traits::result; - - std::map cache; - mutable std::mutex mutex; - -public: - template - Result operator() (Args &&... args) - { - Key key{std::forward(args)...}; - - { - std::lock_guard lock(mutex); - - auto it = cache.find(key); - - if (cache.end() != it) - return it->second; - } - - /// The calculations themselves are not done under mutex. - Result res = std::apply(f, key); - - { - std::lock_guard lock(mutex); - - cache.emplace(std::forward_as_tuple(args...), res); - } - - return res; - } - - template - void update(Args &&... args) - { - Key key{std::forward(args)...}; - - Result res = std::apply(f, key); - - { - std::lock_guard lock(mutex); - cache[key] = std::move(res); - } - } - - size_t size() const - { - std::lock_guard lock(mutex); - return cache.size(); - } - - void drop() - { - std::lock_guard lock(mutex); - cache.clear(); - } -}; diff --git a/base/common/function_traits.h b/base/common/function_traits.h deleted file mode 100644 index 9cd104925a7..00000000000 --- a/base/common/function_traits.h +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once - -#include -#include - - -template -struct function_traits; - -template -struct function_traits -{ - using result = ReturnType; - using arguments = std::tuple; - using arguments_decay = std::tuple::type...>; -}; diff --git a/base/common/ya.make b/base/common/ya.make deleted file mode 100644 index fd88760c933..00000000000 --- a/base/common/ya.make +++ /dev/null @@ -1,63 +0,0 @@ -# This file is generated automatically, do not edit. See 'ya.make.in' and use 'utils/generate-ya-make' to regenerate it. -OWNER(g:clickhouse) - -LIBRARY() - -ADDINCL( - GLOBAL clickhouse/base -) - -CFLAGS (GLOBAL -DARCADIA_BUILD) - -CFLAGS (GLOBAL -DUSE_CPUID=1) -CFLAGS (GLOBAL -DUSE_JEMALLOC=0) -CFLAGS (GLOBAL -DUSE_RAPIDJSON=1) -CFLAGS (GLOBAL -DUSE_SSL=1) - -IF (OS_DARWIN) - CFLAGS (GLOBAL -DOS_DARWIN) -ELSEIF (OS_FREEBSD) - CFLAGS (GLOBAL -DOS_FREEBSD) -ELSEIF (OS_LINUX) - CFLAGS (GLOBAL -DOS_LINUX) -ENDIF () - -PEERDIR( - contrib/libs/cctz - contrib/libs/cxxsupp/libcxx-filesystem - contrib/libs/poco/Net - contrib/libs/poco/Util - contrib/libs/poco/NetSSL_OpenSSL - contrib/libs/fmt - contrib/restricted/boost - contrib/restricted/cityhash-1.0.2 -) - -CFLAGS(-g0) - -SRCS( - DateLUT.cpp - DateLUTImpl.cpp - JSON.cpp - LineReader.cpp - StringRef.cpp - argsToConfig.cpp - coverage.cpp - demangle.cpp - errnoToString.cpp - getFQDNOrHostName.cpp - getMemoryAmount.cpp - getPageSize.cpp - getResource.cpp - getThreadId.cpp - mremap.cpp - phdr_cache.cpp - preciseExp10.cpp - setTerminalEcho.cpp - shift10.cpp - sleep.cpp - terminalColors.cpp - -) - -END() diff --git a/base/common/ya.make.in b/base/common/ya.make.in deleted file mode 100644 index 3deb36a2c71..00000000000 --- a/base/common/ya.make.in +++ /dev/null @@ -1,41 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -ADDINCL( - GLOBAL clickhouse/base -) - -CFLAGS (GLOBAL -DARCADIA_BUILD) - -CFLAGS (GLOBAL -DUSE_CPUID=1) -CFLAGS (GLOBAL -DUSE_JEMALLOC=0) -CFLAGS (GLOBAL -DUSE_RAPIDJSON=1) -CFLAGS (GLOBAL -DUSE_SSL=1) - -IF (OS_DARWIN) - CFLAGS (GLOBAL -DOS_DARWIN) -ELSEIF (OS_FREEBSD) - CFLAGS (GLOBAL -DOS_FREEBSD) -ELSEIF (OS_LINUX) - CFLAGS (GLOBAL -DOS_LINUX) -ENDIF () - -PEERDIR( - contrib/libs/cctz - contrib/libs/cxxsupp/libcxx-filesystem - contrib/libs/poco/Net - contrib/libs/poco/Util - contrib/libs/poco/NetSSL_OpenSSL - contrib/libs/fmt - contrib/restricted/boost - contrib/restricted/cityhash-1.0.2 -) - -CFLAGS(-g0) - -SRCS( - -) - -END() diff --git a/base/daemon/BaseDaemon.cpp b/base/daemon/BaseDaemon.cpp index 745e020c8bb..bbb40ebac63 100644 --- a/base/daemon/BaseDaemon.cpp +++ b/base/daemon/BaseDaemon.cpp @@ -1,3 +1,7 @@ +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + #include #include @@ -21,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -34,12 +38,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/base/daemon/BaseDaemon.h b/base/daemon/BaseDaemon.h index 3d47d85a9f5..54a74369dce 100644 --- a/base/daemon/BaseDaemon.h +++ b/base/daemon/BaseDaemon.h @@ -16,9 +16,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/base/daemon/GraphiteWriter.cpp b/base/daemon/GraphiteWriter.cpp index f28019dec01..176b48372d9 100644 --- a/base/daemon/GraphiteWriter.cpp +++ b/base/daemon/GraphiteWriter.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include diff --git a/base/daemon/GraphiteWriter.h b/base/daemon/GraphiteWriter.h index fc07d2b7a40..ef44d82bced 100644 --- a/base/daemon/GraphiteWriter.h +++ b/base/daemon/GraphiteWriter.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include /// пишет в Graphite данные в формате diff --git a/base/daemon/SentryWriter.cpp b/base/daemon/SentryWriter.cpp index 470e1deb362..ad914ff8cf4 100644 --- a/base/daemon/SentryWriter.cpp +++ b/base/daemon/SentryWriter.cpp @@ -3,10 +3,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/base/daemon/ya.make b/base/daemon/ya.make deleted file mode 100644 index f3b4059f002..00000000000 --- a/base/daemon/ya.make +++ /dev/null @@ -1,19 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -NO_COMPILER_WARNINGS() - -PEERDIR( - clickhouse/src/Common -) - -CFLAGS(-g0) - -SRCS( - BaseDaemon.cpp - GraphiteWriter.cpp - SentryWriter.cpp -) - -END() diff --git a/base/glibc-compatibility/glibc-compat-2.32.h b/base/glibc-compatibility/glibc-compat-2.32.h new file mode 100644 index 00000000000..53ed34d60fa --- /dev/null +++ b/base/glibc-compatibility/glibc-compat-2.32.h @@ -0,0 +1,50 @@ +/// In glibc 2.32 new version of some symbols had been added [1]: +/// +/// $ nm -D clickhouse | fgrep -e @GLIBC_2.32 +/// U pthread_getattr_np@GLIBC_2.32 +/// U pthread_sigmask@GLIBC_2.32 +/// +/// [1]: https://www.spinics.net/lists/fedora-devel/msg273044.html +/// +/// Right now ubuntu 20.04 is used as official image for building +/// ClickHouse, however once it will be switched someone may not be happy +/// with that fact that he/she cannot use official binaries anymore because +/// they have glibc < 2.32. +/// +/// To avoid this dependency, let's force previous version of those +/// symbols from glibc. +/// +/// Also note, that the following approach had been tested: +/// a) -Wl,--wrap -- but it goes into endless recursion whey you try to do +/// something like this: +/// +/// int __pthread_getattr_np_compact(pthread_t thread, pthread_attr_t *attr); +/// GLIBC_COMPAT_SYMBOL(__pthread_getattr_np_compact, pthread_getattr_np) +/// int __pthread_getattr_np_compact(pthread_t thread, pthread_attr_t *attr); +/// int __wrap_pthread_getattr_np(pthread_t thread, pthread_attr_t *attr) +/// { +/// return __pthread_getattr_np_compact(thread, attr); +/// } +/// +/// int __pthread_sigmask_compact(int how, const sigset_t *set, sigset_t *oldset); +/// GLIBC_COMPAT_SYMBOL(__pthread_sigmask_compact, pthread_sigmask) +/// int __pthread_sigmask_compact(int how, const sigset_t *set, sigset_t *oldset); +/// int __wrap_pthread_sigmask(int how, const sigset_t *set, sigset_t *oldset) +/// { +/// return __pthread_sigmask_compact(how, set, oldset); +/// } +/// +/// b) -Wl,--defsym -- same problems (and you cannot use version of symbol with +/// version in the expression) +/// c) this approach -- simply add this file with -include directive. + +#if defined(__amd64__) +#define GLIBC_COMPAT_SYMBOL(func) __asm__(".symver " #func "," #func "@GLIBC_2.2.5"); +#elif defined(__aarch64__) +#define GLIBC_COMPAT_SYMBOL(func) __asm__(".symver " #func "," #func "@GLIBC_2.17"); +#else +#error Your platform is not supported. +#endif + +GLIBC_COMPAT_SYMBOL(pthread_sigmask) +GLIBC_COMPAT_SYMBOL(pthread_getattr_np) diff --git a/base/glibc-compatibility/musl/getauxval.c b/base/glibc-compatibility/musl/getauxval.c index a429273fa1a..dad7aa938d7 100644 --- a/base/glibc-compatibility/musl/getauxval.c +++ b/base/glibc-compatibility/musl/getauxval.c @@ -1,4 +1,5 @@ #include +#include "atomic.h" #include // __environ #include @@ -17,18 +18,7 @@ static size_t __find_auxv(unsigned long type) return (size_t) -1; } -__attribute__((constructor)) static void __auxv_init() -{ - size_t i; - for (i = 0; __environ[i]; i++); - __auxv = (unsigned long *) (__environ + i + 1); - - size_t secure_idx = __find_auxv(AT_SECURE); - if (secure_idx != ((size_t) -1)) - __auxv_secure = __auxv[secure_idx]; -} - -unsigned long getauxval(unsigned long type) +unsigned long __getauxval(unsigned long type) { if (type == AT_SECURE) return __auxv_secure; @@ -43,3 +33,38 @@ unsigned long getauxval(unsigned long type) errno = ENOENT; return 0; } + +static void * volatile getauxval_func; + +static unsigned long __auxv_init(unsigned long type) +{ + if (!__environ) + { + // __environ is not initialized yet so we can't initialize __auxv right now. + // That's normally occurred only when getauxval() is called from some sanitizer's internal code. + errno = ENOENT; + return 0; + } + + // Initialize __auxv and __auxv_secure. + size_t i; + for (i = 0; __environ[i]; i++); + __auxv = (unsigned long *) (__environ + i + 1); + + size_t secure_idx = __find_auxv(AT_SECURE); + if (secure_idx != ((size_t) -1)) + __auxv_secure = __auxv[secure_idx]; + + // Now we've initialized __auxv, next time getauxval() will only call __get_auxval(). + a_cas_p(&getauxval_func, (void *)__auxv_init, (void *)__getauxval); + + return __getauxval(type); +} + +// First time getauxval() will call __auxv_init(). +static void * volatile getauxval_func = (void *)__auxv_init; + +unsigned long getauxval(unsigned long type) +{ + return ((unsigned long (*)(unsigned long))getauxval_func)(type); +} diff --git a/base/loggers/ExtendedLogChannel.cpp b/base/loggers/ExtendedLogChannel.cpp index 4ab6ad5c96a..fa414216aa5 100644 --- a/base/loggers/ExtendedLogChannel.cpp +++ b/base/loggers/ExtendedLogChannel.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace DB diff --git a/base/loggers/OwnPatternFormatter.cpp b/base/loggers/OwnPatternFormatter.cpp index e62039f4a27..3e1c66acba3 100644 --- a/base/loggers/OwnPatternFormatter.cpp +++ b/base/loggers/OwnPatternFormatter.cpp @@ -8,8 +8,8 @@ #include #include #include -#include -#include +#include +#include #include "Loggers.h" diff --git a/base/loggers/OwnSplitChannel.cpp b/base/loggers/OwnSplitChannel.cpp index eb881e4a661..62fdddad28c 100644 --- a/base/loggers/OwnSplitChannel.cpp +++ b/base/loggers/OwnSplitChannel.cpp @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include diff --git a/base/loggers/ya.make b/base/loggers/ya.make deleted file mode 100644 index 943b6f12b73..00000000000 --- a/base/loggers/ya.make +++ /dev/null @@ -1,19 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -PEERDIR( - clickhouse/src/Common -) - -CFLAGS(-g0) - -SRCS( - ExtendedLogChannel.cpp - Loggers.cpp - OwnFormattingChannel.cpp - OwnPatternFormatter.cpp - OwnSplitChannel.cpp -) - -END() diff --git a/base/mysqlxx/CMakeLists.txt b/base/mysqlxx/CMakeLists.txt index c5230c2b49f..947f61f9051 100644 --- a/base/mysqlxx/CMakeLists.txt +++ b/base/mysqlxx/CMakeLists.txt @@ -49,6 +49,8 @@ if (NOT USE_INTERNAL_MYSQL_LIBRARY AND OPENSSL_INCLUDE_DIR) target_include_directories (mysqlxx SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR}) endif () +target_no_warning(mysqlxx reserved-macro-identifier) + if (NOT USE_INTERNAL_MYSQL_LIBRARY AND USE_STATIC_LIBRARIES) message(WARNING "Statically linking with system mysql/mariadb only works " "if mysql client libraries are built with same openssl version as " diff --git a/base/mysqlxx/Pool.cpp b/base/mysqlxx/Pool.cpp index 2f47aa67356..a74feb54cd3 100644 --- a/base/mysqlxx/Pool.cpp +++ b/base/mysqlxx/Pool.cpp @@ -7,10 +7,22 @@ #endif #include - -#include - +#include #include +#include + + +namespace +{ + +inline uint64_t clock_gettime_ns(clockid_t clock_type = CLOCK_MONOTONIC) +{ + struct timespec ts; + clock_gettime(clock_type, &ts); + return uint64_t(ts.tv_sec * 1000000000LL + ts.tv_nsec); +} + +} namespace mysqlxx @@ -124,10 +136,15 @@ Pool::~Pool() } -Pool::Entry Pool::get() +Pool::Entry Pool::get(uint64_t wait_timeout) { std::unique_lock lock(mutex); + uint64_t deadline = 0; + /// UINT64_MAX -- wait indefinitely + if (wait_timeout && wait_timeout != UINT64_MAX) + deadline = clock_gettime_ns() + wait_timeout * 1'000'000'000; + initialize(); for (;;) { @@ -153,6 +170,12 @@ Pool::Entry Pool::get() logger.trace("(%s): Unable to create a new connection: Max number of connections has been reached.", getDescription()); } + if (!wait_timeout) + throw Poco::Exception("mysqlxx::Pool is full (wait is disabled, see connection_wait_timeout setting)"); + + if (deadline && clock_gettime_ns() >= deadline) + throw Poco::Exception("mysqlxx::Pool is full (connection_wait_timeout is exceeded)"); + lock.unlock(); logger.trace("(%s): Sleeping for %d seconds.", getDescription(), MYSQLXX_POOL_SLEEP_ON_CONNECT_FAIL); sleepForSeconds(MYSQLXX_POOL_SLEEP_ON_CONNECT_FAIL); diff --git a/base/mysqlxx/Pool.h b/base/mysqlxx/Pool.h index 530e2c78cf2..f542c3d3b76 100644 --- a/base/mysqlxx/Pool.h +++ b/base/mysqlxx/Pool.h @@ -189,7 +189,7 @@ public: ~Pool(); /// Allocates connection. - Entry get(); + Entry get(uint64_t wait_timeout = UINT64_MAX); /// Allocates connection. /// If database is not accessible, returns empty Entry object. diff --git a/base/mysqlxx/PoolFactory.cpp b/base/mysqlxx/PoolFactory.cpp index f0a5543d723..1d2f9fc74c7 100644 --- a/base/mysqlxx/PoolFactory.cpp +++ b/base/mysqlxx/PoolFactory.cpp @@ -79,7 +79,7 @@ PoolWithFailover PoolFactory::get(const Poco::Util::AbstractConfiguration & conf std::lock_guard lock(impl->mutex); if (auto entry = impl->pools.find(config_name); entry != impl->pools.end()) { - return *(entry->second.get()); + return *(entry->second); } else { @@ -100,7 +100,7 @@ PoolWithFailover PoolFactory::get(const Poco::Util::AbstractConfiguration & conf impl->pools.insert_or_assign(config_name, pool); impl->pools_by_ids.insert_or_assign(entry_name, config_name); } - return *(pool.get()); + return *pool; } } diff --git a/base/mysqlxx/PoolWithFailover.cpp b/base/mysqlxx/PoolWithFailover.cpp index e317ab7f228..14c0db9ecd5 100644 --- a/base/mysqlxx/PoolWithFailover.cpp +++ b/base/mysqlxx/PoolWithFailover.cpp @@ -21,8 +21,9 @@ PoolWithFailover::PoolWithFailover( const unsigned max_connections_, const size_t max_tries_) : max_tries(max_tries_) + , shareable(config_.getBool(config_name_ + ".share_connection", false)) + , wait_timeout(UINT64_MAX) { - shareable = config_.getBool(config_name_ + ".share_connection", false); if (config_.has(config_name_ + ".replica")) { Poco::Util::AbstractConfiguration::Keys replica_keys; @@ -80,9 +81,11 @@ PoolWithFailover::PoolWithFailover( const std::string & password, unsigned default_connections_, unsigned max_connections_, - size_t max_tries_) + size_t max_tries_, + uint64_t wait_timeout_) : max_tries(max_tries_) , shareable(false) + , wait_timeout(wait_timeout_) { /// Replicas have the same priority, but traversed replicas are moved to the end of the queue. for (const auto & [host, port] : addresses) @@ -101,6 +104,7 @@ PoolWithFailover::PoolWithFailover( PoolWithFailover::PoolWithFailover(const PoolWithFailover & other) : max_tries{other.max_tries} , shareable{other.shareable} + , wait_timeout(other.wait_timeout) { if (shareable) { @@ -140,7 +144,7 @@ PoolWithFailover::Entry PoolWithFailover::get() try { - Entry entry = shareable ? pool->get() : pool->tryGet(); + Entry entry = shareable ? pool->get(wait_timeout) : pool->tryGet(); if (!entry.isNull()) { @@ -172,7 +176,7 @@ PoolWithFailover::Entry PoolWithFailover::get() if (full_pool) { app.logger().error("All connections failed, trying to wait on a full pool " + (*full_pool)->getDescription()); - return (*full_pool)->get(); + return (*full_pool)->get(wait_timeout); } std::stringstream message; diff --git a/base/mysqlxx/PoolWithFailover.h b/base/mysqlxx/PoolWithFailover.h index 1c7a63e76c0..2bd5ec9f30a 100644 --- a/base/mysqlxx/PoolWithFailover.h +++ b/base/mysqlxx/PoolWithFailover.h @@ -80,6 +80,8 @@ namespace mysqlxx std::mutex mutex; /// Can the Pool be shared bool shareable; + /// Timeout for waiting free connection. + uint64_t wait_timeout = 0; public: using Entry = Pool::Entry; @@ -96,6 +98,7 @@ namespace mysqlxx * default_connections Number of connection in pool to each replica at start. * max_connections Maximum number of connections in pool to each replica. * max_tries_ Max number of connection tries. + * wait_timeout_ Timeout for waiting free connection. */ PoolWithFailover( const std::string & config_name_, @@ -117,7 +120,8 @@ namespace mysqlxx const std::string & password, unsigned default_connections_ = MYSQLXX_POOL_WITH_FAILOVER_DEFAULT_START_CONNECTIONS, unsigned max_connections_ = MYSQLXX_POOL_WITH_FAILOVER_DEFAULT_MAX_CONNECTIONS, - size_t max_tries_ = MYSQLXX_POOL_WITH_FAILOVER_DEFAULT_MAX_TRIES); + size_t max_tries_ = MYSQLXX_POOL_WITH_FAILOVER_DEFAULT_MAX_TRIES, + uint64_t wait_timeout_ = UINT64_MAX); PoolWithFailover(const PoolWithFailover & other); diff --git a/base/mysqlxx/Value.h b/base/mysqlxx/Value.h index 57cfd452045..6d3b2e96ebd 100644 --- a/base/mysqlxx/Value.h +++ b/base/mysqlxx/Value.h @@ -8,12 +8,12 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include namespace mysqlxx diff --git a/base/mysqlxx/mysqlxx.h b/base/mysqlxx/mysqlxx.h index d64dadfc367..0caadcbb720 100644 --- a/base/mysqlxx/mysqlxx.h +++ b/base/mysqlxx/mysqlxx.h @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/base/mysqlxx/ya.make b/base/mysqlxx/ya.make deleted file mode 100644 index aabc9922e72..00000000000 --- a/base/mysqlxx/ya.make +++ /dev/null @@ -1,39 +0,0 @@ -# This file is generated automatically, do not edit. See 'ya.make.in' and use 'utils/generate-ya-make' to regenerate it. -LIBRARY() - -OWNER(g:clickhouse) - -CFLAGS(-g0) - -PEERDIR( - contrib/restricted/boost/libs - contrib/libs/libmysql_r - contrib/libs/poco/Foundation - contrib/libs/poco/Util -) - -ADDINCL( - GLOBAL clickhouse/base - clickhouse/base - contrib/libs/libmysql_r -) - -NO_COMPILER_WARNINGS() - -NO_UTIL() - -SRCS( - Connection.cpp - Exception.cpp - Pool.cpp - PoolFactory.cpp - PoolWithFailover.cpp - Query.cpp - ResultBase.cpp - Row.cpp - UseQueryResult.cpp - Value.cpp - -) - -END() diff --git a/base/mysqlxx/ya.make.in b/base/mysqlxx/ya.make.in deleted file mode 100644 index 10755078e20..00000000000 --- a/base/mysqlxx/ya.make.in +++ /dev/null @@ -1,28 +0,0 @@ -LIBRARY() - -OWNER(g:clickhouse) - -CFLAGS(-g0) - -PEERDIR( - contrib/restricted/boost/libs - contrib/libs/libmysql_r - contrib/libs/poco/Foundation - contrib/libs/poco/Util -) - -ADDINCL( - GLOBAL clickhouse/base - clickhouse/base - contrib/libs/libmysql_r -) - -NO_COMPILER_WARNINGS() - -NO_UTIL() - -SRCS( - -) - -END() diff --git a/base/pcg-random/ya.make b/base/pcg-random/ya.make deleted file mode 100644 index 705cdc05341..00000000000 --- a/base/pcg-random/ya.make +++ /dev/null @@ -1,7 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -ADDINCL (GLOBAL clickhouse/base/pcg-random) - -END() diff --git a/base/readpassphrase/readpassphrase.c b/base/readpassphrase/readpassphrase.c index 8a7d3153915..3bcad34e481 100644 --- a/base/readpassphrase/readpassphrase.c +++ b/base/readpassphrase/readpassphrase.c @@ -27,6 +27,10 @@ #define _PATH_TTY "/dev/tty" #endif +#if defined(__clang__) && __clang_major__ >= 13 +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif + #include #include #include diff --git a/base/readpassphrase/ya.make b/base/readpassphrase/ya.make deleted file mode 100644 index d1ace8925ae..00000000000 --- a/base/readpassphrase/ya.make +++ /dev/null @@ -1,11 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -CFLAGS(-g0) - -SRCS( - readpassphrase.c -) - -END() diff --git a/base/widechar_width/ya.make b/base/widechar_width/ya.make deleted file mode 100644 index 0d61e0dbf70..00000000000 --- a/base/widechar_width/ya.make +++ /dev/null @@ -1,13 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -ADDINCL(GLOBAL clickhouse/base/widechar_width) - -CFLAGS(-g0) - -SRCS( - widechar_width.cpp -) - -END() diff --git a/base/ya.make b/base/ya.make deleted file mode 100644 index 19a16044280..00000000000 --- a/base/ya.make +++ /dev/null @@ -1,11 +0,0 @@ -OWNER(g:clickhouse) - -RECURSE( - common - daemon - loggers - mysqlxx - pcg-random - widechar_width - readpassphrase -) diff --git a/benchmark/hardware.sh b/benchmark/hardware.sh index e4a94ef1854..76328e1509d 100755 --- a/benchmark/hardware.sh +++ b/benchmark/hardware.sh @@ -11,8 +11,8 @@ DATASET="${TABLE}_v1.tar.xz" QUERIES_FILE="queries.sql" TRIES=3 -AMD64_BIN_URL="https://builds.clickhouse.tech/master/amd64/clickhouse" -AARCH64_BIN_URL="https://builds.clickhouse.tech/master/aarch64/clickhouse" +AMD64_BIN_URL="https://builds.clickhouse.com/master/amd64/clickhouse" +AARCH64_BIN_URL="https://builds.clickhouse.com/master/aarch64/clickhouse" # Note: on older Ubuntu versions, 'axel' does not support IPv6. If you are using IPv6-only servers on very old Ubuntu, just don't install 'axel'. diff --git a/benchmark/monetdb/instruction.md b/benchmark/monetdb/instruction.md index 482693d6485..b48bb19ecc1 100644 --- a/benchmark/monetdb/instruction.md +++ b/benchmark/monetdb/instruction.md @@ -179,7 +179,7 @@ CREATE TABLE hits # How to prepare data Download the 100 million rows dataset from here and insert into ClickHouse: -https://clickhouse.tech/docs/en/getting-started/example-datasets/metrica/ +https://clickhouse.com/docs/en/getting-started/example-datasets/metrica/ Create the dataset from ClickHouse: diff --git a/benchmark/omnisci/instruction.md b/benchmark/omnisci/instruction.md index 81b45241277..e81e3783e44 100644 --- a/benchmark/omnisci/instruction.md +++ b/benchmark/omnisci/instruction.md @@ -38,7 +38,7 @@ https://github.com/omnisci/omniscidb/issues?q=is%3Aissue+author%3Aalexey-milovid # How to prepare data Download the 100 million rows dataset from here and insert into ClickHouse: -https://clickhouse.tech/docs/en/getting-started/example-datasets/metrica/ +https://clickhouse.com/docs/en/getting-started/example-datasets/metrica/ Convert the CREATE TABLE query: diff --git a/cmake/analysis.cmake b/cmake/analysis.cmake index 267bb34248b..d1b9c86f15f 100644 --- a/cmake/analysis.cmake +++ b/cmake/analysis.cmake @@ -6,7 +6,7 @@ if (ENABLE_CLANG_TIDY) message(FATAL_ERROR "clang-tidy requires CMake version at least 3.6.") endif() - find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-11" "clang-tidy-10" "clang-tidy-9" "clang-tidy-8") + find_program (CLANG_TIDY_PATH NAMES "clang-tidy" "clang-tidy-13" "clang-tidy-12" "clang-tidy-11" "clang-tidy-10" "clang-tidy-9" "clang-tidy-8") if (CLANG_TIDY_PATH) message(STATUS diff --git a/cmake/autogenerated_versions.txt b/cmake/autogenerated_versions.txt index 03247b4b3ea..dd6ead7d97f 100644 --- a/cmake/autogenerated_versions.txt +++ b/cmake/autogenerated_versions.txt @@ -2,11 +2,11 @@ # NOTE: has nothing common with DBMS_TCP_PROTOCOL_VERSION, # only DBMS_TCP_PROTOCOL_VERSION should be incremented on protocol changes. -SET(VERSION_REVISION 54455) +SET(VERSION_REVISION 54456) SET(VERSION_MAJOR 21) -SET(VERSION_MINOR 10) +SET(VERSION_MINOR 11) SET(VERSION_PATCH 1) -SET(VERSION_GITHASH 09df5018f95edcd0f759d4689ac5d029dd400c2a) -SET(VERSION_DESCRIBE v21.10.1.1-testing) -SET(VERSION_STRING 21.10.1.1) +SET(VERSION_GITHASH 7a4a0b0edef0ad6e0aa662cd3b90c3f4acf796e7) +SET(VERSION_DESCRIBE v21.11.1.1-prestable) +SET(VERSION_STRING 21.11.1.1) # end of autochange diff --git a/cmake/check_flags.cmake b/cmake/check_flags.cmake index 5a4ff472868..58605543dff 100644 --- a/cmake/check_flags.cmake +++ b/cmake/check_flags.cmake @@ -4,3 +4,4 @@ include (CheckCCompilerFlag) check_cxx_compiler_flag("-Wsuggest-destructor-override" HAS_SUGGEST_DESTRUCTOR_OVERRIDE) check_cxx_compiler_flag("-Wshadow" HAS_SHADOW) check_cxx_compiler_flag("-Wsuggest-override" HAS_SUGGEST_OVERRIDE) +check_cxx_compiler_flag("-Xclang -fuse-ctor-homing" HAS_USE_CTOR_HOMING) diff --git a/cmake/find/amqpcpp.cmake b/cmake/find/amqpcpp.cmake index a4a58349508..05e5d2da751 100644 --- a/cmake/find/amqpcpp.cmake +++ b/cmake/find/amqpcpp.cmake @@ -17,7 +17,7 @@ if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/CMakeLists.txt") endif () set (USE_AMQPCPP 1) -set (AMQPCPP_LIBRARY amqp-cpp) +set (AMQPCPP_LIBRARY amqp-cpp ${OPENSSL_LIBRARIES}) set (AMQPCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include") list (APPEND AMQPCPP_INCLUDE_DIR diff --git a/cmake/find/ccache.cmake b/cmake/find/ccache.cmake index 986c9cb5fe2..43c2de0c921 100644 --- a/cmake/find/ccache.cmake +++ b/cmake/find/ccache.cmake @@ -51,8 +51,8 @@ if (CCACHE_FOUND AND NOT COMPILER_MATCHES_CCACHE) message(STATUS "ccache is 4.2+ no quirks for SOURCE_DATE_EPOCH required") elseif (CCACHE_VERSION VERSION_GREATER_EQUAL "4.0") message(STATUS "Ignore SOURCE_DATE_EPOCH for ccache") - set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE "env -u SOURCE_DATE_EPOCH ${CCACHE_FOUND}") - set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK "env -u SOURCE_DATE_EPOCH ${CCACHE_FOUND}") + set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE "env -u SOURCE_DATE_EPOCH") + set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK "env -u SOURCE_DATE_EPOCH") endif() else () message(${RECONFIGURE_MESSAGE_LEVEL} "Not using ${CCACHE_FOUND} ${CCACHE_VERSION} bug: https://bugzilla.samba.org/show_bug.cgi?id=8118") diff --git a/cmake/find/llvm.cmake b/cmake/find/llvm.cmake index 816164bef10..84ac29991ab 100644 --- a/cmake/find/llvm.cmake +++ b/cmake/find/llvm.cmake @@ -1,8 +1,10 @@ -if (APPLE OR SPLIT_SHARED_LIBRARIES OR NOT ARCH_AMD64 OR SANITIZE STREQUAL "undefined") - set (ENABLE_EMBEDDED_COMPILER OFF CACHE INTERNAL "") +if (APPLE OR NOT ARCH_AMD64 OR SANITIZE STREQUAL "undefined") + set (ENABLE_EMBEDDED_COMPILER_DEFAULT OFF) +else() + set (ENABLE_EMBEDDED_COMPILER_DEFAULT ON) endif() -option (ENABLE_EMBEDDED_COMPILER "Enable support for 'compile_expressions' option for query execution" ON) +option (ENABLE_EMBEDDED_COMPILER "Enable support for 'compile_expressions' option for query execution" ${ENABLE_EMBEDDED_COMPILER_DEFAULT}) if (NOT ENABLE_EMBEDDED_COMPILER) set (USE_EMBEDDED_COMPILER 0) diff --git a/cmake/find/zlib.cmake b/cmake/find/zlib.cmake index bd96424b60d..f66f9e6713d 100644 --- a/cmake/find/zlib.cmake +++ b/cmake/find/zlib.cmake @@ -29,6 +29,9 @@ if (NOT USE_INTERNAL_ZLIB_LIBRARY) endif () if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY) + # https://github.com/zlib-ng/zlib-ng/pull/733 + # This is disabed by default + add_compile_definitions(Z_TLS=__thread) set (USE_INTERNAL_ZLIB_LIBRARY 1) set (ZLIB_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}" "${ClickHouse_BINARY_DIR}/contrib/${INTERNAL_ZLIB_NAME}" CACHE INTERNAL "") # generated zconf.h set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) # for poco diff --git a/cmake/freebsd/toolchain-x86_64.cmake b/cmake/freebsd/toolchain-x86_64.cmake index d9839ec74ee..f9e45686db7 100644 --- a/cmake/freebsd/toolchain-x86_64.cmake +++ b/cmake/freebsd/toolchain-x86_64.cmake @@ -10,7 +10,7 @@ set (CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) # disable linkage check - it set (CMAKE_AR "/usr/bin/ar" CACHE FILEPATH "" FORCE) set (CMAKE_RANLIB "/usr/bin/ranlib" CACHE FILEPATH "" FORCE) -set (LINKER_NAME "lld" CACHE STRING "" FORCE) +set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE) set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld") set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld") diff --git a/cmake/git_status.cmake b/cmake/git_status.cmake new file mode 100644 index 00000000000..8748aacfedd --- /dev/null +++ b/cmake/git_status.cmake @@ -0,0 +1,17 @@ +# Print the status of the git repository (if git is available). +# This is useful for troubleshooting build failure reports +find_package(Git) + +if (Git_FOUND) + execute_process( + COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE GIT_COMMIT_ID + OUTPUT_STRIP_TRAILING_WHITESPACE) + message(STATUS "HEAD's commit hash ${GIT_COMMIT_ID}") + execute_process( + COMMAND ${GIT_EXECUTABLE} status + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) +else() + message(STATUS "The git program could not be found.") +endif() diff --git a/cmake/linux/toolchain-aarch64.cmake b/cmake/linux/toolchain-aarch64.cmake index e3924fdc537..b4dc6e45cbb 100644 --- a/cmake/linux/toolchain-aarch64.cmake +++ b/cmake/linux/toolchain-aarch64.cmake @@ -13,7 +13,7 @@ set (CMAKE_C_FLAGS_INIT "${CMAKE_C_FLAGS} --gcc-toolchain=${CMAKE_CURRENT_LIST_D set (CMAKE_CXX_FLAGS_INIT "${CMAKE_CXX_FLAGS} --gcc-toolchain=${CMAKE_CURRENT_LIST_DIR}/../toolchain/linux-aarch64") set (CMAKE_ASM_FLAGS_INIT "${CMAKE_ASM_FLAGS} --gcc-toolchain=${CMAKE_CURRENT_LIST_DIR}/../toolchain/linux-aarch64") -set (LINKER_NAME "lld" CACHE STRING "" FORCE) +set (LINKER_NAME "ld.lld" CACHE STRING "" FORCE) set (CMAKE_EXE_LINKER_FLAGS_INIT "-fuse-ld=lld") set (CMAKE_SHARED_LINKER_FLAGS_INIT "-fuse-ld=lld") diff --git a/cmake/tools.cmake b/cmake/tools.cmake index 8ff94ab867b..f94f4b289a3 100644 --- a/cmake/tools.cmake +++ b/cmake/tools.cmake @@ -79,8 +79,9 @@ endif () if (LINKER_NAME) if (COMPILER_CLANG AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12.0.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 12.0.0)) - set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LINKER_NAME}") - set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LINKER_NAME}") + find_program (LLD_PATH NAMES ${LINKER_NAME}) + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --ld-path=${LLD_PATH}") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --ld-path=${LLD_PATH}") else () set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}") set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=${LINKER_NAME}") diff --git a/cmake/warnings.cmake b/cmake/warnings.cmake index a85fe8963c7..0b6bbe36cf9 100644 --- a/cmake/warnings.cmake +++ b/cmake/warnings.cmake @@ -192,4 +192,29 @@ elseif (COMPILER_GCC) # For some reason (bug in gcc?) macro 'GCC diagnostic ignored "-Wstringop-overflow"' doesn't help. add_cxx_compile_options(-Wno-stringop-overflow) endif() + + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11) + # reinterpretAs.cpp:182:31: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type + # ‘using ToFieldType = using FieldType = using UUID = struct StrongTypedef, DB::UUIDTag>’ + # {aka ‘struct StrongTypedef, DB::UUIDTag>’} from an array of ‘const char8_t’ + add_cxx_compile_options(-Wno-error=class-memaccess) + + # Maybe false positive... + # In file included from /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/memory:673, + # In function ‘void std::__1::__libcpp_operator_delete(_Args ...) [with _Args = {void*, long unsigned int}]’, + # inlined from ‘void std::__1::__do_deallocate_handle_size(void*, size_t, _Args ...) [with _Args = {}]’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/new:271:34, + # inlined from ‘void std::__1::__libcpp_deallocate(void*, size_t, size_t)’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/new:285:41, + # inlined from ‘constexpr void std::__1::allocator<_Tp>::deallocate(_Tp*, size_t) [with _Tp = char]’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/memory:849:39, + # inlined from ‘static constexpr void std::__1::allocator_traits<_Alloc>::deallocate(std::__1::allocator_traits<_Alloc>::allocator_type&, std::__1::allocator_traits<_Alloc>::pointer, std::__1::allocator_traits<_Alloc>::size_type) [with _Alloc = std::__1::allocator]’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/__memory/allocator_traits.h:476:24, + # inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>::~basic_string() [with _CharT = char; _Traits = std::__1::char_traits; _Allocator = std::__1::allocator]’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/string:2219:35, + # inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>::~basic_string() [with _CharT = char; _Traits = std::__1::char_traits; _Allocator = std::__1::allocator]’ at /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/string:2213:1, + # inlined from ‘DB::JSONBuilder::JSONMap::Pair::~Pair()’ at /home/jakalletti/ClickHouse/ClickHouse/src/Common/JSONBuilder.h:90:12, + # inlined from ‘void DB::JSONBuilder::JSONMap::add(std::__1::string, DB::JSONBuilder::ItemPtr)’ at /home/jakalletti/ClickHouse/ClickHouse/src/Common/JSONBuilder.h:97:68, + # inlined from ‘virtual void DB::ExpressionStep::describeActions(DB::JSONBuilder::JSONMap&) const’ at /home/jakalletti/ClickHouse/ClickHouse/src/Processors/QueryPlan/ExpressionStep.cpp:102:12: + # /home/jakalletti/ClickHouse/ClickHouse/contrib/libcxx/include/new:247:20: error: ‘void operator delete(void*, size_t)’ called on a pointer to an unallocated object ‘7598543875853023301’ [-Werror=free-nonheap-object] + add_cxx_compile_options(-Wno-error=free-nonheap-object) + + # AggregateFunctionAvg.h:203:100: error: ‘this’ pointer is null [-Werror=nonnull] + add_cxx_compile_options(-Wno-error=nonnull) + endif() endif () diff --git a/cmake/yandex/ya.make.versions.inc b/cmake/yandex/ya.make.versions.inc deleted file mode 100644 index 6910164d0aa..00000000000 --- a/cmake/yandex/ya.make.versions.inc +++ /dev/null @@ -1,25 +0,0 @@ -INCLUDE(${ARCADIA_ROOT}/clickhouse/cmake/autogenerated_versions.txt) - -# TODO: not sure if this is customizable per-binary -SET(VERSION_NAME "ClickHouse") - -# TODO: not quite sure how to replace dash with space in ya.make -SET(VERSION_FULL "${VERSION_NAME}-${VERSION_STRING}") - -CFLAGS (GLOBAL -DDBMS_NAME=\"ClickHouse\") -CFLAGS (GLOBAL -DDBMS_VERSION_MAJOR=${VERSION_MAJOR}) -CFLAGS (GLOBAL -DDBMS_VERSION_MINOR=${VERSION_MINOR}) -CFLAGS (GLOBAL -DDBMS_VERSION_PATCH=${VERSION_PATCH}) -CFLAGS (GLOBAL -DVERSION_FULL=\"\\\"${VERSION_FULL}\\\"\") -CFLAGS (GLOBAL -DVERSION_MAJOR=${VERSION_MAJOR}) -CFLAGS (GLOBAL -DVERSION_MINOR=${VERSION_MINOR}) -CFLAGS (GLOBAL -DVERSION_PATCH=${VERSION_PATCH}) - -# TODO: not supported yet, not sure if ya.make supports arithmetic. -CFLAGS (GLOBAL -DVERSION_INTEGER=0) - -CFLAGS (GLOBAL -DVERSION_NAME=\"\\\"${VERSION_NAME}\\\"\") -CFLAGS (GLOBAL -DVERSION_OFFICIAL=\"-arcadia\") -CFLAGS (GLOBAL -DVERSION_REVISION=${VERSION_REVISION}) -CFLAGS (GLOBAL -DVERSION_STRING=\"\\\"${VERSION_STRING}\\\"\") - diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index e6e098a05b3..140cc0846ec 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -33,6 +33,7 @@ endif() set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL 1) add_subdirectory (abseil-cpp-cmake) +add_subdirectory (magic-enum-cmake) add_subdirectory (boost-cmake) add_subdirectory (cctz-cmake) add_subdirectory (consistent-hashing) @@ -206,12 +207,14 @@ elseif(GTEST_SRC_DIR) target_compile_definitions(gtest INTERFACE GTEST_HAS_POSIX_RE=0) endif() -if (USE_EMBEDDED_COMPILER) +function(add_llvm) # ld: unknown option: --color-diagnostics if (APPLE) set (LINKER_SUPPORTS_COLOR_DIAGNOSTICS 0 CACHE INTERNAL "") endif () + # Do not adjust RPATH in llvm, since then it will not be able to find libcxx/libcxxabi/libunwind + set (CMAKE_INSTALL_RPATH "ON") set (LLVM_ENABLE_EH 1 CACHE INTERNAL "") set (LLVM_ENABLE_RTTI 1 CACHE INTERNAL "") set (LLVM_ENABLE_PIC 0 CACHE INTERNAL "") @@ -219,13 +222,12 @@ if (USE_EMBEDDED_COMPILER) # Need to use C++17 since the compilation is not possible with C++20 currently, due to ambiguous operator != etc. # LLVM project will set its default value for the -std=... but our global setting from CMake will override it. - set (CMAKE_CXX_STANDARD_bak ${CMAKE_CXX_STANDARD}) set (CMAKE_CXX_STANDARD 17) add_subdirectory (llvm/llvm) - - set (CMAKE_CXX_STANDARD ${CMAKE_CXX_STANDARD_bak}) - unset (CMAKE_CXX_STANDARD_bak) +endfunction() +if (USE_EMBEDDED_COMPILER) + add_llvm() endif () if (USE_INTERNAL_LIBGSASL_LIBRARY) diff --git a/contrib/abseil-cpp b/contrib/abseil-cpp index 4f3b686f86c..b004a8a0241 160000 --- a/contrib/abseil-cpp +++ b/contrib/abseil-cpp @@ -1 +1 @@ -Subproject commit 4f3b686f86c3ebaba7e4e926e62a79cb1c659a54 +Subproject commit b004a8a02418b83de8b686caa0b0f6e39ac2191f diff --git a/contrib/amqpcpp-cmake/CMakeLists.txt b/contrib/amqpcpp-cmake/CMakeLists.txt index 5637db4cf41..faef7bd4a1c 100644 --- a/contrib/amqpcpp-cmake/CMakeLists.txt +++ b/contrib/amqpcpp-cmake/CMakeLists.txt @@ -41,6 +41,4 @@ target_compile_options (amqp-cpp ) target_include_directories (amqp-cpp SYSTEM PUBLIC "${LIBRARY_DIR}/include") - -target_link_libraries (amqp-cpp PUBLIC ssl) - +target_link_libraries(amqp-cpp PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) diff --git a/contrib/aws b/contrib/aws index 7d48b2c8193..06aa8759d17 160000 --- a/contrib/aws +++ b/contrib/aws @@ -1 +1 @@ -Subproject commit 7d48b2c8193679cc4516e5bd68ae4a64b94dae7d +Subproject commit 06aa8759d17f2032ffd5efa83969270ca9ac727b diff --git a/contrib/boost b/contrib/boost index 9cf09dbfd55..66d17f060c4 160000 --- a/contrib/boost +++ b/contrib/boost @@ -1 +1 @@ -Subproject commit 9cf09dbfd55a5c6202dedbdf40781a51b02c2675 +Subproject commit 66d17f060c4867aeea99fa2a20cfdae89ae2a2ec diff --git a/contrib/boost-cmake/CMakeLists.txt b/contrib/boost-cmake/CMakeLists.txt index 675931d319f..27072910135 100644 --- a/contrib/boost-cmake/CMakeLists.txt +++ b/contrib/boost-cmake/CMakeLists.txt @@ -16,7 +16,7 @@ if (NOT USE_INTERNAL_BOOST_LIBRARY) graph ) - if(Boost_INCLUDE_DIR AND Boost_FILESYSTEM_LIBRARY AND Boost_FILESYSTEM_LIBRARY AND + if(Boost_INCLUDE_DIR AND Boost_FILESYSTEM_LIBRARY AND Boost_PROGRAM_OPTIONS_LIBRARY AND Boost_REGEX_LIBRARY AND Boost_SYSTEM_LIBRARY AND Boost_CONTEXT_LIBRARY AND Boost_COROUTINE_LIBRARY AND Boost_GRAPH_LIBRARY) @@ -238,4 +238,14 @@ if (NOT EXTERNAL_BOOST_FOUND) target_include_directories (_boost_graph PRIVATE ${LIBRARY_DIR}) target_link_libraries(_boost_graph PRIVATE _boost_regex) + # circular buffer + add_library(_boost_circular_buffer INTERFACE) + add_library(boost::circular_buffer ALIAS _boost_circular_buffer) + target_include_directories(_boost_circular_buffer SYSTEM BEFORE INTERFACE ${LIBRARY_DIR}) + + # heap + add_library(_boost_heap INTERFACE) + add_library(boost::heap ALIAS _boost_heap) + target_include_directories(_boost_heap SYSTEM BEFORE INTERFACE ${LIBRARY_DIR}) + endif () diff --git a/contrib/boringssl-cmake/CMakeLists.txt b/contrib/boringssl-cmake/CMakeLists.txt index 9d8c6ca6083..4502d6e9d42 100644 --- a/contrib/boringssl-cmake/CMakeLists.txt +++ b/contrib/boringssl-cmake/CMakeLists.txt @@ -15,12 +15,12 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() if(CMAKE_COMPILER_IS_GNUCXX OR CLANG) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fvisibility=hidden -fno-common -fno-exceptions -fno-rtti") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-common -fno-exceptions -fno-rtti") if(APPLE AND CLANG) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fno-common") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-common") if((CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.8.99") OR CLANG) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") else() diff --git a/contrib/fastops b/contrib/fastops index 88752a5e03c..012b777df9e 160000 --- a/contrib/fastops +++ b/contrib/fastops @@ -1 +1 @@ -Subproject commit 88752a5e03cf34639a4a37a4b41d8b463fffd2b5 +Subproject commit 012b777df9e2d145a24800a6c8c3d4a0249bb09e diff --git a/contrib/libhdfs3 b/contrib/libhdfs3 index 095b9d48b40..082e55f17d1 160000 --- a/contrib/libhdfs3 +++ b/contrib/libhdfs3 @@ -1 +1 @@ -Subproject commit 095b9d48b400abb72d967cb0539af13b1e3d90cf +Subproject commit 082e55f17d1c58bf124290fb044fea40e985ec11 diff --git a/contrib/libpqxx-cmake/CMakeLists.txt b/contrib/libpqxx-cmake/CMakeLists.txt index ae35538ccf4..65fa94cb3fd 100644 --- a/contrib/libpqxx-cmake/CMakeLists.txt +++ b/contrib/libpqxx-cmake/CMakeLists.txt @@ -22,6 +22,7 @@ set (SRCS "${LIBRARY_DIR}/src/transaction.cxx" "${LIBRARY_DIR}/src/transaction_base.cxx" "${LIBRARY_DIR}/src/row.cxx" + "${LIBRARY_DIR}/src/params.cxx" "${LIBRARY_DIR}/src/util.cxx" "${LIBRARY_DIR}/src/version.cxx" ) @@ -31,6 +32,7 @@ set (SRCS # conflicts with all includes of . set (HDRS "${LIBRARY_DIR}/include/pqxx/array.hxx" + "${LIBRARY_DIR}/include/pqxx/params.hxx" "${LIBRARY_DIR}/include/pqxx/binarystring.hxx" "${LIBRARY_DIR}/include/pqxx/composite.hxx" "${LIBRARY_DIR}/include/pqxx/connection.hxx" @@ -75,4 +77,3 @@ set(CM_CONFIG_PQ "${LIBRARY_DIR}/include/pqxx/config-internal-libpq.h") configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_INT}" @ONLY) configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_PUB}" @ONLY) configure_file("${CM_CONFIG_H_IN}" "${CM_CONFIG_PQ}" @ONLY) - diff --git a/contrib/libunwind b/contrib/libunwind index 6b816d2fba3..c4ea9848a69 160000 --- a/contrib/libunwind +++ b/contrib/libunwind @@ -1 +1 @@ -Subproject commit 6b816d2fba3991f8fd6aaec17d92f68947eab667 +Subproject commit c4ea9848a697747dfa35325af9b3452f30841685 diff --git a/contrib/llvm b/contrib/llvm index e5751459412..f30bbecef78 160000 --- a/contrib/llvm +++ b/contrib/llvm @@ -1 +1 @@ -Subproject commit e5751459412bce1391fb7a2e9bbc01e131bf72f1 +Subproject commit f30bbecef78b75b527e257c1304d0be2f2f95975 diff --git a/contrib/magic-enum-cmake/CMakeLists.txt b/contrib/magic-enum-cmake/CMakeLists.txt new file mode 100644 index 00000000000..142f9c7c755 --- /dev/null +++ b/contrib/magic-enum-cmake/CMakeLists.txt @@ -0,0 +1,3 @@ +set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/magic_enum") +add_library (magic_enum INTERFACE) +target_include_directories(magic_enum INTERFACE ${LIBRARY_DIR}/include) diff --git a/contrib/magic_enum b/contrib/magic_enum new file mode 160000 index 00000000000..38f86e4d093 --- /dev/null +++ b/contrib/magic_enum @@ -0,0 +1 @@ +Subproject commit 38f86e4d093cfc9034a140d37de2168e3951bef3 diff --git a/contrib/nanodbc b/contrib/nanodbc index 9fc45967551..df52a1232df 160000 --- a/contrib/nanodbc +++ b/contrib/nanodbc @@ -1 +1 @@ -Subproject commit 9fc459675515d491401727ec67fca38db721f28c +Subproject commit df52a1232dfa182f9af60974d001b91823afe9bc diff --git a/contrib/poco b/contrib/poco index 7351c4691b5..46c80daf1b0 160000 --- a/contrib/poco +++ b/contrib/poco @@ -1 +1 @@ -Subproject commit 7351c4691b5d401f59e3959adfc5b4fa263b32da +Subproject commit 46c80daf1b015aa10474ce82e3d24b578c6ae422 diff --git a/contrib/replxx b/contrib/replxx index c81be6c68b1..f97765df14f 160000 --- a/contrib/replxx +++ b/contrib/replxx @@ -1 +1 @@ -Subproject commit c81be6c68b146f15f2096b7ef80e3f21fe27004c +Subproject commit f97765df14f4a6236d69b8f14b53ef2051ebd95a diff --git a/contrib/rocksdb b/contrib/rocksdb index b6480c69bf3..296c1b8b95f 160000 --- a/contrib/rocksdb +++ b/contrib/rocksdb @@ -1 +1 @@ -Subproject commit b6480c69bf3ab6e298e0d019a07fd4f69029b26a +Subproject commit 296c1b8b95fd448b8097a1b2cc9f704ff4a73a2c diff --git a/debian/changelog b/debian/changelog index f3e740d20cf..460424bdb36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -clickhouse (21.10.1.1) unstable; urgency=low +clickhouse (21.11.1.1) unstable; urgency=low * Modified source code - -- clickhouse-release Sat, 17 Jul 2021 08:45:03 +0300 + -- clickhouse-release Thu, 09 Sep 2021 12:03:26 +0300 diff --git a/debian/clickhouse-server.init b/debian/clickhouse-server.init index 4e70d382b36..1dd87fe80ae 100755 --- a/debian/clickhouse-server.init +++ b/debian/clickhouse-server.init @@ -3,10 +3,17 @@ # Provides: clickhouse-server # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Required-Start: $network -# Required-Stop: $network +# Should-Start: $time $network +# Should-Stop: $network # Short-Description: Yandex clickhouse-server daemon ### END INIT INFO +# +# NOTES: +# - Should-* -- script can start if the listed facilities are missing, unlike Required-* +# +# For the documentation [1]: +# +# [1]: https://wiki.debian.org/LSBInitScripts CLICKHOUSE_USER=clickhouse CLICKHOUSE_GROUP=${CLICKHOUSE_USER} diff --git a/debian/clickhouse-server.service b/debian/clickhouse-server.service index b9681f9279e..bc19235cb3a 100644 --- a/debian/clickhouse-server.service +++ b/debian/clickhouse-server.service @@ -1,7 +1,12 @@ [Unit] Description=ClickHouse Server (analytic DBMS for big data) Requires=network-online.target -After=network-online.target +# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure +# that the time was adjusted already, if you use systemd-timesyncd you are +# safe, but if you use ntp or some other daemon, you should configure it +# additionaly. +After=time-sync.target network-online.target +Wants=time-sync.target [Service] Type=simple @@ -16,4 +21,5 @@ LimitNOFILE=500000 CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE [Install] +# ClickHouse should not start from the rescue shell (rescue.target). WantedBy=multi-user.target diff --git a/debian/control b/debian/control index 9b34e982698..ac75b00df22 100644 --- a/debian/control +++ b/debian/control @@ -1,16 +1,14 @@ Source: clickhouse Section: database Priority: optional -Maintainer: Alexey Milovidov +Maintainer: Alexey Milovidov Build-Depends: debhelper (>= 9), cmake | cmake3, ninja-build, - clang-11, - llvm-11, + clang-13, + llvm-13, + lld-13, libc6-dev, - libicu-dev, - libreadline-dev, - gperf, tzdata Standards-Version: 3.9.8 diff --git a/debian/rules b/debian/rules index 73d1f3d3b34..4562d24bec4 100755 --- a/debian/rules +++ b/debian/rules @@ -36,8 +36,8 @@ endif CMAKE_FLAGS += -DENABLE_UTILS=0 -DEB_CC ?= $(shell which gcc-10 gcc-9 gcc | head -n1) -DEB_CXX ?= $(shell which g++-10 g++-9 g++ | head -n1) +DEB_CC ?= $(shell which gcc-11 gcc-10 gcc-9 gcc | head -n1) +DEB_CXX ?= $(shell which g++-11 g++-10 g++-9 g++ | head -n1) ifdef DEB_CXX DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) diff --git a/docker-compose.yml b/docker-compose.yml index 23773bd75d0..3e3cfc38218 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,14 +2,14 @@ version: "2" services: builder: - image: yandex/clickhouse-builder + image: clickhouse/clickhouse-builder build: docker/builder client: - image: yandex/clickhouse-client + image: clickhouse/clickhouse-client build: docker/client command: ['--host', 'server'] server: - image: yandex/clickhouse-server + image: clickhouse/clickhouse-server build: docker/server ports: - 8123:8123 diff --git a/docker/bare/prepare b/docker/bare/prepare index 912b16634c7..a6b271714fb 100755 --- a/docker/bare/prepare +++ b/docker/bare/prepare @@ -6,7 +6,7 @@ SRC_DIR=../.. BUILD_DIR=${SRC_DIR}/build # BTW, .so files are acceptable from any Linux distribution for the last 12 years (at least). -# See https://presentations.clickhouse.tech/cpp_russia_2020/ for the details. +# See https://presentations.clickhouse.com/cpp_russia_2020/ for the details. mkdir root pushd root diff --git a/docker/builder/Dockerfile b/docker/builder/Dockerfile index 199b5217d79..5a998ffbe3e 100644 --- a/docker/builder/Dockerfile +++ b/docker/builder/Dockerfile @@ -1,6 +1,8 @@ FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11 +ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=13 + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ diff --git a/docker/builder/build.sh b/docker/builder/build.sh index d4cf662e91b..1025af3f96e 100755 --- a/docker/builder/build.sh +++ b/docker/builder/build.sh @@ -4,7 +4,7 @@ set -e #ccache -s # uncomment to display CCache statistics mkdir -p /server/build_docker cd /server/build_docker -cmake -G Ninja /server "-DCMAKE_C_COMPILER=$(command -v clang-11)" "-DCMAKE_CXX_COMPILER=$(command -v clang++-11)" +cmake -G Ninja /server "-DCMAKE_C_COMPILER=$(command -v clang-13)" "-DCMAKE_CXX_COMPILER=$(command -v clang++-13)" # Set the number of build jobs to the half of number of virtual CPU cores (rounded up). # By default, ninja use all virtual CPU cores, that leads to very high memory consumption without much improvement in build time. diff --git a/docker/client/Dockerfile b/docker/client/Dockerfile index 052e008fd56..926014da9e6 100644 --- a/docker/client/Dockerfile +++ b/docker/client/Dockerfile @@ -1,7 +1,9 @@ FROM ubuntu:18.04 -ARG repository="deb https://repo.clickhouse.tech/deb/stable/ main/" -ARG version=21.10.1.* +ARG repository="deb https://repo.clickhouse.com/deb/stable/ main/" +ARG version=21.11.1.* + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install --yes --no-install-recommends \ diff --git a/docker/client/README.md b/docker/client/README.md index b8cb51adb1e..bbcc7d60794 100644 --- a/docker/client/README.md +++ b/docker/client/README.md @@ -1,6 +1,6 @@ # ClickHouse Client Docker Image -For more information see [ClickHouse Server Docker Image](https://hub.docker.com/r/yandex/clickhouse-server/). +For more information see [ClickHouse Server Docker Image](https://hub.docker.com/r/clickhouse/clickhouse-server/). ## License diff --git a/docker/images.json b/docker/images.json index e2e22468596..3e8adda868c 100644 --- a/docker/images.json +++ b/docker/images.json @@ -1,12 +1,12 @@ { "docker/packager/deb": { - "name": "yandex/clickhouse-deb-builder", + "name": "clickhouse/deb-builder", "dependent": [ "docker/packager/unbundled" ] }, "docker/packager/binary": { - "name": "yandex/clickhouse-binary-builder", + "name": "clickhouse/binary-builder", "dependent": [ "docker/test/split_build_smoke_test", "docker/test/pvs", @@ -14,155 +14,157 @@ ] }, "docker/packager/unbundled": { - "name": "yandex/clickhouse-unbundled-builder", + "name": "clickhouse/unbundled-builder", "dependent": [] }, "docker/test/compatibility/centos": { - "name": "yandex/clickhouse-test-old-centos", + "name": "clickhouse/test-old-centos", "dependent": [] }, "docker/test/compatibility/ubuntu": { - "name": "yandex/clickhouse-test-old-ubuntu", + "name": "clickhouse/test-old-ubuntu", "dependent": [] }, "docker/test/integration/base": { - "name": "yandex/clickhouse-integration-test", + "name": "clickhouse/integration-test", "dependent": [] }, "docker/test/fuzzer": { - "name": "yandex/clickhouse-fuzzer", + "name": "clickhouse/fuzzer", "dependent": [] }, "docker/test/performance-comparison": { - "name": "yandex/clickhouse-performance-comparison", + "name": "clickhouse/performance-comparison", "dependent": [] }, "docker/test/pvs": { - "name": "yandex/clickhouse-pvs-test", + "name": "clickhouse/pvs-test", "dependent": [] }, + "docker/test/util": { + "name": "clickhouse/test-util", + "dependent": [ + "docker/test/base", + "docker/test/fasttest" + ] + }, "docker/test/stateless": { - "name": "yandex/clickhouse-stateless-test", + "name": "clickhouse/stateless-test", "dependent": [ "docker/test/stateful", "docker/test/coverage", "docker/test/unit" ] }, - "docker/test/stateless_pytest": { - "name": "yandex/clickhouse-stateless-pytest", - "dependent": [] - }, "docker/test/stateful": { - "name": "yandex/clickhouse-stateful-test", + "name": "clickhouse/stateful-test", "dependent": [ "docker/test/stress" ] }, "docker/test/coverage": { - "name": "yandex/clickhouse-test-coverage", + "name": "clickhouse/test-coverage", "dependent": [] }, "docker/test/unit": { - "name": "yandex/clickhouse-unit-test", + "name": "clickhouse/unit-test", "dependent": [] }, "docker/test/stress": { - "name": "yandex/clickhouse-stress-test", + "name": "clickhouse/stress-test", "dependent": [] }, "docker/test/split_build_smoke_test": { - "name": "yandex/clickhouse-split-build-smoke-test", + "name": "clickhouse/split-build-smoke-test", "dependent": [] }, "docker/test/codebrowser": { - "name": "yandex/clickhouse-codebrowser", + "name": "clickhouse/codebrowser", "dependent": [] }, "docker/test/integration/runner": { - "name": "yandex/clickhouse-integration-tests-runner", + "name": "clickhouse/integration-tests-runner", "dependent": [] }, "docker/test/testflows/runner": { - "name": "yandex/clickhouse-testflows-runner", + "name": "clickhouse/testflows-runner", "dependent": [] }, "docker/test/fasttest": { - "name": "yandex/clickhouse-fasttest", + "name": "clickhouse/fasttest", "dependent": [] }, "docker/test/style": { - "name": "yandex/clickhouse-style-test", + "name": "clickhouse/style-test", "dependent": [] }, "docker/test/integration/s3_proxy": { - "name": "yandex/clickhouse-s3-proxy", + "name": "clickhouse/s3-proxy", "dependent": [] }, "docker/test/integration/resolver": { - "name": "yandex/clickhouse-python-bottle", + "name": "clickhouse/python-bottle", "dependent": [] }, "docker/test/integration/helper_container": { - "name": "yandex/clickhouse-integration-helper", + "name": "clickhouse/integration-helper", "dependent": [] }, "docker/test/integration/mysql_golang_client": { - "name": "yandex/clickhouse-mysql-golang-client", + "name": "clickhouse/mysql-golang-client", "dependent": [] }, "docker/test/integration/mysql_java_client": { - "name": "yandex/clickhouse-mysql-java-client", + "name": "clickhouse/mysql-java-client", "dependent": [] }, "docker/test/integration/mysql_js_client": { - "name": "yandex/clickhouse-mysql-js-client", + "name": "clickhouse/mysql-js-client", "dependent": [] }, "docker/test/integration/mysql_php_client": { - "name": "yandex/clickhouse-mysql-php-client", + "name": "clickhouse/mysql-php-client", "dependent": [] }, "docker/test/integration/postgresql_java_client": { - "name": "yandex/clickhouse-postgresql-java-client", + "name": "clickhouse/postgresql-java-client", "dependent": [] }, "docker/test/integration/kerberos_kdc": { - "name": "yandex/clickhouse-kerberos-kdc", + "name": "clickhouse/kerberos-kdc", "dependent": [] }, "docker/test/base": { - "name": "yandex/clickhouse-test-base", + "name": "clickhouse/test-base", "dependent": [ "docker/test/stateless", "docker/test/stateless_unbundled", - "docker/test/stateless_pytest", "docker/test/integration/base", "docker/test/fuzzer", "docker/test/keeper-jepsen" ] }, "docker/packager/unbundled": { - "name": "yandex/clickhouse-unbundled-builder", + "name": "clickhouse/unbundled-builder", "dependent": [ "docker/test/stateless_unbundled" ] }, "docker/test/stateless_unbundled": { - "name": "yandex/clickhouse-stateless-unbundled-test", + "name": "clickhouse/stateless-unbundled-test", "dependent": [ ] }, "docker/test/integration/kerberized_hadoop": { - "name": "yandex/clickhouse-kerberized-hadoop", + "name": "clickhouse/kerberized-hadoop", "dependent": [] }, "docker/test/sqlancer": { - "name": "yandex/clickhouse-sqlancer-test", + "name": "clickhouse/sqlancer-test", "dependent": [] }, "docker/test/keeper-jepsen": { - "name": "yandex/clickhouse-keeper-jepsen-test", + "name": "clickhouse/keeper-jepsen-test", "dependent": [] } } diff --git a/docker/packager/binary/Dockerfile b/docker/packager/binary/Dockerfile index 29225bbfeb8..23012a38f9d 100644 --- a/docker/packager/binary/Dockerfile +++ b/docker/packager/binary/Dockerfile @@ -1,7 +1,9 @@ -# docker build -t yandex/clickhouse-binary-builder . +# docker build -t clickhouse/binary-builder . FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11 +ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=13 + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install \ @@ -37,20 +39,18 @@ RUN apt-get update \ bash \ build-essential \ ccache \ - clang-11 \ - clang-tidy-11 \ cmake \ curl \ - g++-10 \ - gcc-10 \ gdb \ git \ gperf \ + clang-${LLVM_VERSION} \ + clang-tidy-${LLVM_VERSION} \ + lld-${LLVM_VERSION} \ + llvm-${LLVM_VERSION} \ + llvm-${LLVM_VERSION}-dev \ libicu-dev \ libreadline-dev \ - lld-11 \ - llvm-11 \ - llvm-11-dev \ moreutils \ ninja-build \ pigz \ @@ -100,15 +100,10 @@ RUN wget -nv "https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.0 # Download toolchain for FreeBSD 11.3 RUN wget -nv https://clickhouse-datasets.s3.yandex.net/toolchains/toolchains/freebsd-11.3-toolchain.tar.xz -# NOTE: For some reason we have outdated version of gcc-10 in ubuntu 20.04 stable. -# Current workaround is to use latest version proposed repo. Remove as soon as -# gcc-10.2 appear in stable repo. -RUN echo 'deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe' > /etc/apt/sources.list.d/proposed-repositories.list - -RUN apt-get update \ - && apt-get install gcc-10 g++-10 --yes - -RUN rm /etc/apt/sources.list.d/proposed-repositories.list && apt-get update +# NOTE: Seems like gcc-11 is too new for ubuntu20 repository +RUN add-apt-repository ppa:ubuntu-toolchain-r/test --yes \ + && apt-get update \ + && apt-get install gcc-11 g++-11 --yes COPY build.sh / diff --git a/docker/packager/binary/build.sh b/docker/packager/binary/build.sh index d6614bbb9e2..71402a2fd66 100755 --- a/docker/packager/binary/build.sh +++ b/docker/packager/binary/build.sh @@ -4,7 +4,6 @@ set -x -e mkdir -p build/cmake/toolchain/darwin-x86_64 tar xJf MacOSX11.0.sdk.tar.xz -C build/cmake/toolchain/darwin-x86_64 --strip-components=1 - ln -sf darwin-x86_64 build/cmake/toolchain/darwin-aarch64 mkdir -p build/cmake/toolchain/linux-aarch64 @@ -23,6 +22,7 @@ cd build/build_docker rm -f CMakeCache.txt # Read cmake arguments into array (possibly empty) read -ra CMAKE_FLAGS <<< "${CMAKE_FLAGS:-}" +env cmake --debug-trycompile --verbose=1 -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" "-DSANITIZE=$SANITIZER" -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. ccache --show-config ||: @@ -83,6 +83,16 @@ then mv "$COMBINED_OUTPUT.tgz" /output fi +# Also build fuzzers if any sanitizer specified +if [ -n "$SANITIZER" ] +then + # Currently we are in build/build_docker directory + ../docker/packager/other/fuzzer.sh +fi + +ccache --show-config ||: +ccache --show-stats ||: + if [ "${CCACHE_DEBUG:-}" == "1" ] then find . -name '*.ccache-*' -print0 \ @@ -95,4 +105,3 @@ then # files in place, and will fail because this directory is not writable. tar -cv -I pixz -f /output/ccache.log.txz "$CCACHE_LOGFILE" fi - diff --git a/docker/packager/deb/Dockerfile b/docker/packager/deb/Dockerfile index 241b691cd23..318b960e0b4 100644 --- a/docker/packager/deb/Dockerfile +++ b/docker/packager/deb/Dockerfile @@ -1,7 +1,9 @@ -# docker build -t yandex/clickhouse-deb-builder . +# docker build -t clickhouse/deb-builder . FROM ubuntu:20.04 -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11 +ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=13 + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ @@ -35,17 +37,17 @@ RUN curl -O https://clickhouse-datasets.s3.yandex.net/utils/1/dpkg-deb \ RUN apt-get update \ && apt-get install \ alien \ - clang-11 \ - clang-tidy-11 \ + clang-${LLVM_VERSION} \ + clang-tidy-${LLVM_VERSION} \ cmake \ debhelper \ devscripts \ gdb \ git \ gperf \ - lld-11 \ - llvm-11 \ - llvm-11-dev \ + lld-${LLVM_VERSION} \ + llvm-${LLVM_VERSION} \ + llvm-${LLVM_VERSION}-dev \ moreutils \ ninja-build \ perl \ @@ -55,15 +57,11 @@ RUN apt-get update \ tzdata \ --yes --no-install-recommends -# NOTE: For some reason we have outdated version of gcc-10 in ubuntu 20.04 stable. -# Current workaround is to use latest version proposed repo. Remove as soon as -# gcc-10.2 appear in stable repo. -RUN echo 'deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe' > /etc/apt/sources.list.d/proposed-repositories.list +# NOTE: Seems like gcc-11 is too new for ubuntu20 repository +RUN add-apt-repository ppa:ubuntu-toolchain-r/test --yes \ + && apt-get update \ + && apt-get install gcc-11 g++-11 --yes -RUN apt-get update \ - && apt-get install gcc-10 g++-10 --yes --no-install-recommends - -RUN rm /etc/apt/sources.list.d/proposed-repositories.list && apt-get update # This symlink required by gcc to find lld compiler RUN ln -s /usr/bin/lld-${LLVM_VERSION} /usr/bin/ld.lld diff --git a/docker/packager/deb/build.sh b/docker/packager/deb/build.sh index 4e14574b738..46f6404363d 100755 --- a/docker/packager/deb/build.sh +++ b/docker/packager/deb/build.sh @@ -23,12 +23,24 @@ then echo "Place $BINARY_OUTPUT to output" mkdir /output/binary ||: # if exists mv /build/obj-*/programs/clickhouse* /output/binary + if [ "$BINARY_OUTPUT" = "tests" ] then mv /build/obj-*/src/unit_tests_dbms /output/binary fi fi +# Also build fuzzers if any sanitizer specified +if [ -n "$SANITIZER" ] +then + # Script is supposed that we are in build directory. + mkdir -p build/build_docker + cd build/build_docker + # Launching build script + ../docker/packager/other/fuzzer.sh + cd +fi + ccache --show-config ||: ccache --show-stats ||: diff --git a/docker/packager/other/fuzzer.sh b/docker/packager/other/fuzzer.sh new file mode 100755 index 00000000000..1a8b80c3f77 --- /dev/null +++ b/docker/packager/other/fuzzer.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# This script is responsible for building all fuzzers, and copy them to output directory +# as an archive. +# Script is supposed that we are in build directory. + +set -x -e + +printenv + +# Delete previous cache, because we add a new flags -DENABLE_FUZZING=1 and -DFUZZER=libfuzzer +rm -f CMakeCache.txt +read -ra CMAKE_FLAGS <<< "${CMAKE_FLAGS:-}" +# Hope, that the most part of files will be in cache, so we just link new executables +cmake --debug-trycompile --verbose=1 -DCMAKE_VERBOSE_MAKEFILE=1 -LA -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DENABLE_CLICKHOUSE_ODBC_BRIDGE=OFF \ + -DENABLE_LIBRARIES=0 -DENABLE_SSL=1 -DUSE_INTERNAL_SSL_LIBRARY=1 -DUSE_UNWIND=ON -DENABLE_EMBEDDED_COMPILER=0 \ + -DENABLE_EXAMPLES=0 -DENABLE_UTILS=0 -DENABLE_THINLTO=0 "-DSANITIZE=$SANITIZER" \ + -DENABLE_FUZZING=1 -DFUZZER='libfuzzer' -DENABLE_TCMALLOC=0 -DENABLE_JEMALLOC=0 \ + -DENABLE_CHECK_HEAVY_BUILDS=1 "${CMAKE_FLAGS[@]}" .. + +FUZZER_TARGETS=$(find ../src -name '*_fuzzer.cpp' -execdir basename {} .cpp ';' | tr '\n' ' ') + +mkdir -p /output/fuzzers +for FUZZER_TARGET in $FUZZER_TARGETS +do + # shellcheck disable=SC2086 # No quotes because I want it to expand to nothing if empty. + ninja $NINJA_FLAGS $FUZZER_TARGET + # Find this binary in build directory and strip it + FUZZER_PATH=$(find ./src -name "$FUZZER_TARGET") + strip --strip-unneeded "$FUZZER_PATH" + mv "$FUZZER_PATH" /output/fuzzers +done + +tar -zcvf /output/fuzzers.tar.gz /output/fuzzers +rm -rf /output/fuzzers diff --git a/docker/packager/packager b/docker/packager/packager index 95b7fcd8568..f8e5fd717cf 100755 --- a/docker/packager/packager +++ b/docker/packager/packager @@ -9,9 +9,9 @@ import sys SCRIPT_PATH = os.path.realpath(__file__) IMAGE_MAP = { - "deb": "yandex/clickhouse-deb-builder", - "binary": "yandex/clickhouse-binary-builder", - "unbundled": "yandex/clickhouse-unbundled-builder" + "deb": "clickhouse/deb-builder", + "binary": "clickhouse/binary-builder", + "unbundled": "clickhouse/unbundled-builder" } def check_image_exists_locally(image_name): @@ -75,7 +75,7 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, image_typ # Explicitly use LLD with Clang by default. # Don't force linker for cross-compilation. if is_clang and not is_cross_compile: - cmake_flags.append("-DLINKER_NAME=lld") + cmake_flags.append("-DLINKER_NAME=ld.lld") if is_cross_darwin: cc = compiler[:-len(DARWIN_SUFFIX)] @@ -105,6 +105,9 @@ def parse_env_variables(build_type, compiler, sanitizer, package_type, image_typ if image_type == "deb" or image_type == "unbundled": result.append("DEB_CC={}".format(cc)) result.append("DEB_CXX={}".format(cxx)) + # For building fuzzers + result.append("CC={}".format(cc)) + result.append("CXX={}".format(cxx)) elif image_type == "binary": result.append("CC={}".format(cc)) result.append("CXX={}".format(cxx)) @@ -201,7 +204,9 @@ if __name__ == "__main__": parser.add_argument("--output-dir", required=True) parser.add_argument("--build-type", choices=("debug", ""), default="") parser.add_argument("--compiler", choices=("clang-11", "clang-11-darwin", "clang-11-darwin-aarch64", "clang-11-aarch64", - "clang-11-freebsd", "gcc-10"), default="clang-11") + "clang-12", "clang-12-darwin", "clang-12-darwin-aarch64", "clang-12-aarch64", + "clang-13", "clang-13-darwin", "clang-13-darwin-aarch64", "clang-13-aarch64", + "clang-11-freebsd", "clang-12-freebsd", "clang-13-freebsd", "gcc-11"), default="clang-13") parser.add_argument("--sanitizer", choices=("address", "thread", "memory", "undefined", ""), default="") parser.add_argument("--unbundled", action="store_true") parser.add_argument("--split-binary", action="store_true") diff --git a/docker/packager/unbundled/Dockerfile b/docker/packager/unbundled/Dockerfile index 07031aa2d1b..4fe093a0751 100644 --- a/docker/packager/unbundled/Dockerfile +++ b/docker/packager/unbundled/Dockerfile @@ -1,10 +1,12 @@ -# docker build -t yandex/clickhouse-unbundled-builder . -FROM yandex/clickhouse-deb-builder +# docker build -t clickhouse/unbundled-builder . +FROM clickhouse/deb-builder RUN export CODENAME="$(lsb_release --codename --short | tr 'A-Z' 'a-z')" \ && wget -nv -O /tmp/arrow-keyring.deb "https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-${CODENAME}.deb" \ && dpkg -i /tmp/arrow-keyring.deb +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + # Libraries from OS are only needed to test the "unbundled" build (that is not used in production). RUN apt-get update \ && apt-get install \ @@ -15,6 +17,7 @@ RUN apt-get update \ devscripts \ libc++-dev \ libc++abi-dev \ + libboost-all-dev \ libboost-program-options-dev \ libboost-system-dev \ libboost-filesystem-dev \ diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 25f01230c5f..48b59d1e754 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 -ARG repository="deb https://repo.clickhouse.tech/deb/stable/ main/" -ARG version=21.10.1.* +ARG repository="deb https://repo.clickhouse.com/deb/stable/ main/" +ARG version=21.11.1.* ARG gosu_ver=1.10 # set non-empty deb_location_url url to create a docker image @@ -12,7 +12,7 @@ ARG deb_location_url="" # set non-empty single_binary_location_url to create docker image # from a single binary url (useful for non-standard builds - with sanitizers, for arm64). # for example (run on aarch64 server): -# docker build . --network host --build-arg single_binary_location_url="https://builds.clickhouse.tech/master/aarch64/clickhouse" -t altinity/clickhouse-server:master-testing-arm +# docker build . --network host --build-arg single_binary_location_url="https://builds.clickhouse.com/master/aarch64/clickhouse" -t altinity/clickhouse-server:master-testing-arm # note: clickhouse-odbc-bridge is not supported there. ARG single_binary_location_url="" @@ -26,6 +26,8 @@ ARG DEBIAN_FRONTEND=noninteractive # installed to prevent picking those uid / gid by some unrelated software. # The same uid / gid (101) is used both for alpine and ubuntu. +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN groupadd -r clickhouse --gid=101 \ && useradd -r -g clickhouse --uid=101 --home-dir=/var/lib/clickhouse --shell=/bin/bash clickhouse \ && apt-get update \ diff --git a/docker/server/README.md b/docker/server/README.md index 6f799d68185..c63bb980c13 100644 --- a/docker/server/README.md +++ b/docker/server/README.md @@ -6,30 +6,30 @@ ClickHouse is an open-source column-oriented database management system that all ClickHouse manages extremely large volumes of data in a stable and sustainable manner. It currently powers [Yandex.Metrica](https://metrica.yandex.com/), world’s [second largest](http://w3techs.com/technologies/overview/traffic_analysis/all) web analytics platform, with over 13 trillion database records and over 20 billion events a day, generating customized reports on-the-fly, directly from non-aggregated data. This system was successfully implemented at [CERN’s LHCb experiment](https://www.yandex.com/company/press_center/press_releases/2012/2012-04-10/) to store and process metadata on 10bn events with over 1000 attributes per event registered in 2011. -For more information and documentation see https://clickhouse.yandex/. +For more information and documentation see https://clickhouse.com/. ## How to use this image ### start server instance ```bash -$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server +$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server ``` By default ClickHouse will be accessible only via docker network. See the [networking section below](#networking). ### connect to it from a native client ```bash -$ docker run -it --rm --link some-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server +$ docker run -it --rm --link some-clickhouse-server:clickhouse-server clickhouse/clickhouse-client --host clickhouse-server ``` -More information about [ClickHouse client](https://clickhouse.yandex/docs/en/interfaces/cli/). +More information about [ClickHouse client](https://clickhouse.com/docs/en/interfaces/cli/). ### connect to it using curl ```bash echo "SELECT 'Hello, ClickHouse!'" | docker run -i --rm --link some-clickhouse-server:clickhouse-server curlimages/curl 'http://clickhouse-server:8123/?query=' -s --data-binary @- ``` -More information about [ClickHouse HTTP Interface](https://clickhouse.tech/docs/en/interfaces/http/). +More information about [ClickHouse HTTP Interface](https://clickhouse.com/docs/en/interfaces/http/). ### stopping / removing the containter @@ -43,7 +43,7 @@ $ docker rm some-clickhouse-server You can expose you ClickHouse running in docker by [mapping particular port](https://docs.docker.com/config/containers/container-networking/) from inside container to a host ports: ```bash -$ docker run -d -p 18123:8123 -p19000:9000 --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server +$ docker run -d -p 18123:8123 -p19000:9000 --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server $ echo 'SELECT version()' | curl 'http://localhost:18123/' --data-binary @- 20.12.3.3 ``` @@ -51,7 +51,7 @@ $ echo 'SELECT version()' | curl 'http://localhost:18123/' --data-binary @- or by allowing container to use [host ports directly](https://docs.docker.com/network/host/) using `--network=host` (also allows archiving better network performance): ```bash -$ docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server +$ docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server $ echo 'SELECT version()' | curl 'http://localhost:8123/' --data-binary @- 20.12.3.3 ``` @@ -67,7 +67,7 @@ Typically you may want to mount the following folders inside your container to a $ docker run -d \ -v $(realpath ./ch_data):/var/lib/clickhouse/ \ -v $(realpath ./ch_logs):/var/log/clickhouse-server/ \ - --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server + --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server ``` You may also want to mount: @@ -85,30 +85,30 @@ It is optional and can be enabled using the following [docker command line agrum ```bash $ docker run -d \ --cap-add=SYS_NICE --cap-add=NET_ADMIN --cap-add=IPC_LOCK \ - --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server + --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server ``` ## Configuration -Container exposes 8123 port for [HTTP interface](https://clickhouse.yandex/docs/en/interfaces/http_interface/) and 9000 port for [native client](https://clickhouse.yandex/docs/en/interfaces/tcp/). +Container exposes 8123 port for [HTTP interface](https://clickhouse.com/docs/en/interfaces/http_interface/) and 9000 port for [native client](https://clickhouse.com/docs/en/interfaces/tcp/). -ClickHouse configuration represented with a file "config.xml" ([documentation](https://clickhouse.yandex/docs/en/operations/configuration_files/)) +ClickHouse configuration represented with a file "config.xml" ([documentation](https://clickhouse.com/docs/en/operations/configuration_files/)) ### Start server instance with custom configuration ```bash -$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /path/to/your/config.xml:/etc/clickhouse-server/config.xml yandex/clickhouse-server +$ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 -v /path/to/your/config.xml:/etc/clickhouse-server/config.xml clickhouse/clickhouse-server ``` ### Start server as custom user ``` # $(pwd)/data/clickhouse should exist and be owned by current user -$ docker run --rm --user ${UID}:${GID} --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" yandex/clickhouse-server +$ docker run --rm --user ${UID}:${GID} --name some-clickhouse-server --ulimit nofile=262144:262144 -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server ``` When you use the image with mounting local directories inside you probably would like to not mess your directory tree with files owner and permissions. Then you could use `--user` argument. In this case, you should mount every necessary directory (`/var/lib/clickhouse` and `/var/log/clickhouse-server`) inside the container. Otherwise, image will complain and not start. ### Start server from root (useful in case of userns enabled) ``` -$ docker run --rm -e CLICKHOUSE_UID=0 -e CLICKHOUSE_GID=0 --name clickhouse-server-userns -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" yandex/clickhouse-server +$ docker run --rm -e CLICKHOUSE_UID=0 -e CLICKHOUSE_GID=0 --name clickhouse-server-userns -v "$(pwd)/logs/clickhouse:/var/log/clickhouse-server" -v "$(pwd)/data/clickhouse:/var/lib/clickhouse" clickhouse/clickhouse-server ``` ### How to create default database and user on starting @@ -116,7 +116,7 @@ $ docker run --rm -e CLICKHOUSE_UID=0 -e CLICKHOUSE_GID=0 --name clickhouse-serv Sometimes you may want to create user (user named `default` is used by default) and database on image starting. You can do it using environment variables `CLICKHOUSE_DB`, `CLICKHOUSE_USER`, `CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT` and `CLICKHOUSE_PASSWORD`: ``` -$ docker run --rm -e CLICKHOUSE_DB=my_database -e CLICKHOUSE_USER=username -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=password -p 9000:9000/tcp yandex/clickhouse-server +$ docker run --rm -e CLICKHOUSE_DB=my_database -e CLICKHOUSE_USER=username -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -e CLICKHOUSE_PASSWORD=password -p 9000:9000/tcp clickhouse/clickhouse-server ``` ## How to extend this image diff --git a/docker/server/alpine-build.sh b/docker/server/alpine-build.sh index 329888f2fcb..1b448c61fbb 100755 --- a/docker/server/alpine-build.sh +++ b/docker/server/alpine-build.sh @@ -4,7 +4,7 @@ set -x REPO_CHANNEL="${REPO_CHANNEL:-stable}" # lts / testing / prestable / etc REPO_URL="${REPO_URL:-"https://repo.yandex.ru/clickhouse/tgz/${REPO_CHANNEL}"}" VERSION="${VERSION:-20.9.3.45}" -DOCKER_IMAGE="${DOCKER_IMAGE:-yandex/clickhouse-server}" +DOCKER_IMAGE="${DOCKER_IMAGE:-clickhouse/clickhouse-server}" # where original files live DOCKER_BUILD_FOLDER="${BASH_SOURCE%/*}" diff --git a/docker/server/docker_related_config.xml b/docker/server/docker_related_config.xml index a1563c88b85..3025dc2697c 100644 --- a/docker/server/docker_related_config.xml +++ b/docker/server/docker_related_config.xml @@ -1,4 +1,4 @@ - + :: 0.0.0.0 @@ -9,4 +9,4 @@ 1 --> - + diff --git a/docker/server/entrypoint.sh b/docker/server/entrypoint.sh index 40ba9f730cb..4dd54074d55 100755 --- a/docker/server/entrypoint.sh +++ b/docker/server/entrypoint.sh @@ -87,7 +87,7 @@ if [ -n "$CLICKHOUSE_USER" ] && [ "$CLICKHOUSE_USER" != "default" ] || [ -n "$CL echo "$0: create new user '$CLICKHOUSE_USER' instead 'default'" cat < /etc/clickhouse-server/users.d/default-user.xml - + diff --git a/docker/test/Dockerfile b/docker/test/Dockerfile index 62cfcf9e896..fc8c2ebbe6e 100644 --- a/docker/test/Dockerfile +++ b/docker/test/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:18.04 -ARG repository="deb https://repo.clickhouse.tech/deb/stable/ main/" -ARG version=21.10.1.* +ARG repository="deb https://repo.clickhouse.com/deb/stable/ main/" +ARG version=21.11.1.* RUN apt-get update && \ apt-get install -y apt-transport-https dirmngr && \ diff --git a/docker/test/base/Dockerfile b/docker/test/base/Dockerfile index 29ac7a925b8..caaeff912e7 100644 --- a/docker/test/base/Dockerfile +++ b/docker/test/base/Dockerfile @@ -1,7 +1,9 @@ -# docker build -t yandex/clickhouse-test-base . -FROM ubuntu:20.04 +# docker build -t clickhouse/test-base . +FROM clickhouse/test-util -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11 +ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=13 + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ diff --git a/docker/test/codebrowser/Dockerfile b/docker/test/codebrowser/Dockerfile index bb35258bed8..94aa321252b 100644 --- a/docker/test/codebrowser/Dockerfile +++ b/docker/test/codebrowser/Dockerfile @@ -1,6 +1,8 @@ -# docker build --network=host -t yandex/clickhouse-codebrowser . -# docker run --volume=path_to_repo:/repo_folder --volume=path_to_result:/test_output yandex/clickhouse-codebrowser -FROM yandex/clickhouse-binary-builder +# docker build --network=host -t clickhouse/codebrowser . +# docker run --volume=path_to_repo:/repo_folder --volume=path_to_result:/test_output clickhouse/codebrowser +FROM clickhouse/binary-builder + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update && apt-get --yes --allow-unauthenticated install clang-9 libllvm9 libclang-9-dev @@ -9,7 +11,7 @@ RUN apt-get update && apt-get --yes --allow-unauthenticated install clang-9 libl # https://github.com/ClickHouse-Extras/woboq_codebrowser/commit/37e15eaf377b920acb0b48dbe82471be9203f76b RUN git clone https://github.com/ClickHouse-Extras/woboq_codebrowser -RUN cd woboq_codebrowser && cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-9 -DCMAKE_C_COMPILER=clang-9 && make -j +RUN cd woboq_codebrowser && cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang\+\+-13 -DCMAKE_C_COMPILER=clang-13 && make -j ENV CODEGEN=/woboq_codebrowser/generator/codebrowser_generator ENV CODEINDEX=/woboq_codebrowser/indexgenerator/codebrowser_indexgenerator @@ -22,7 +24,7 @@ ENV SHA=nosha ENV DATA="data" CMD mkdir -p $BUILD_DIRECTORY && cd $BUILD_DIRECTORY && \ - cmake $SOURCE_DIRECTORY -DCMAKE_CXX_COMPILER=/usr/bin/clang\+\+-11 -DCMAKE_C_COMPILER=/usr/bin/clang-11 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 && \ + cmake $SOURCE_DIRECTORY -DCMAKE_CXX_COMPILER=/usr/bin/clang\+\+-13 -DCMAKE_C_COMPILER=/usr/bin/clang-13 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_EMBEDDED_COMPILER=0 -DENABLE_S3=0 && \ mkdir -p $HTML_RESULT_DIRECTORY && \ $CODEGEN -b $BUILD_DIRECTORY -a -o $HTML_RESULT_DIRECTORY -p ClickHouse:$SOURCE_DIRECTORY:$SHA -d $DATA | ts '%Y-%m-%d %H:%M:%S' && \ cp -r $STATIC_DATA $HTML_RESULT_DIRECTORY/ &&\ diff --git a/docker/test/compatibility/centos/Dockerfile b/docker/test/compatibility/centos/Dockerfile index 0ef119d1bb1..628609e374f 100644 --- a/docker/test/compatibility/centos/Dockerfile +++ b/docker/test/compatibility/centos/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-test-old-centos . +# docker build -t clickhouse/test-old-centos . FROM centos:5 CMD /bin/sh -c "/clickhouse server --config /config/config.xml > /var/log/clickhouse-server/stderr.log 2>&1 & \ diff --git a/docker/test/compatibility/ubuntu/Dockerfile b/docker/test/compatibility/ubuntu/Dockerfile index 28f89e47b95..ddd0a76bd44 100644 --- a/docker/test/compatibility/ubuntu/Dockerfile +++ b/docker/test/compatibility/ubuntu/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-test-old-ubuntu . +# docker build -t clickhouse/test-old-ubuntu . FROM ubuntu:12.04 CMD /bin/sh -c "/clickhouse server --config /config/config.xml > /var/log/clickhouse-server/stderr.log 2>&1 & \ diff --git a/docker/test/coverage/Dockerfile b/docker/test/coverage/Dockerfile index 681f65e0f6f..ccf0bbc7c83 100644 --- a/docker/test/coverage/Dockerfile +++ b/docker/test/coverage/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-test-coverage . -FROM yandex/clickhouse-stateless-test +# docker build -t clickhouse/test-coverage . +FROM clickhouse/stateless-test RUN apt-get update -y \ && env DEBIAN_FRONTEND=noninteractive \ diff --git a/docker/test/coverage/run.sh b/docker/test/coverage/run.sh index 11b6ce13ea1..807efdf1e47 100755 --- a/docker/test/coverage/run.sh +++ b/docker/test/coverage/run.sh @@ -80,7 +80,7 @@ LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-client --query "RENAM LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-client --query "RENAME TABLE datasets.visits_v1 TO test.visits" LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-client --query "SHOW TABLES FROM test" -LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-test -j 8 --testname --shard --zookeeper --print-time --use-skip-list 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee /test_result.txt +LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-test -j 8 --testname --shard --zookeeper --print-time 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee /test_result.txt readarray -t FAILED_TESTS < <(awk '/FAIL|TIMEOUT|ERROR/ { print substr($3, 1, length($3)-1) }' "/test_result.txt") @@ -97,7 +97,7 @@ then echo "Going to run again: ${FAILED_TESTS[*]}" - LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-test --order=random --testname --shard --zookeeper --use-skip-list "${FAILED_TESTS[@]}" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a /test_result.txt + LLVM_PROFILE_FILE='client_coverage_%5m.profraw' clickhouse-test --order=random --testname --shard --zookeeper "${FAILED_TESTS[@]}" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee -a /test_result.txt else echo "No failed tests" fi diff --git a/docker/test/coverage/s3downloader b/docker/test/coverage/s3downloader index 363ece8dac6..eb3b3cd9faf 100755 --- a/docker/test/coverage/s3downloader +++ b/docker/test/coverage/s3downloader @@ -92,7 +92,7 @@ if __name__ == "__main__": logging.info("Some exception occured %s", str(ex)) raise finally: - logging.info("Will remove dowloaded file %s from filesystem if it exists", temp_archive_path) + logging.info("Will remove downloaded file %s from filesystem if it exists", temp_archive_path) if os.path.exists(temp_archive_path): os.remove(temp_archive_path) logging.info("Processing of %s finished", dataset) diff --git a/docker/test/fasttest/Dockerfile b/docker/test/fasttest/Dockerfile index 916c94e7311..798910fb952 100644 --- a/docker/test/fasttest/Dockerfile +++ b/docker/test/fasttest/Dockerfile @@ -1,7 +1,9 @@ -# docker build -t yandex/clickhouse-fasttest . -FROM ubuntu:20.04 +# docker build -t clickhouse/fasttest . +FROM clickhouse/test-util -ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=11 +ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=13 + +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list RUN apt-get update \ && apt-get install ca-certificates lsb-release wget gnupg apt-transport-https \ diff --git a/docker/test/fasttest/run.sh b/docker/test/fasttest/run.sh index d0184bb1a64..c8a3ad7c998 100755 --- a/docker/test/fasttest/run.sh +++ b/docker/test/fasttest/run.sh @@ -9,7 +9,7 @@ trap 'kill $(jobs -pr) ||:' EXIT stage=${stage:-} # Compiler version, normally set by Dockerfile -export LLVM_VERSION=${LLVM_VERSION:-11} +export LLVM_VERSION=${LLVM_VERSION:-13} # A variable to pass additional flags to CMake. # Here we explicitly default it to nothing so that bash doesn't complain about @@ -159,6 +159,7 @@ function clone_submodules cd "$FASTTEST_SOURCE" SUBMODULES_TO_UPDATE=( + contrib/magic_enum contrib/abseil-cpp contrib/boost contrib/zlib-ng @@ -261,144 +262,11 @@ function run_tests start_server - TESTS_TO_SKIP=( - 00105_shard_collations - 00109_shard_totals_after_having - 00110_external_sort - 00302_http_compression - 00417_kill_query - 00436_convert_charset - 00490_special_line_separators_and_characters_outside_of_bmp - 00652_replicated_mutations_zookeeper - 00682_empty_parts_merge - 00701_rollup - 00834_cancel_http_readonly_queries_on_client_close - 00911_tautological_compare - - # Hyperscan - 00926_multimatch - 00929_multi_match_edit_distance - 01681_hyperscan_debug_assertion - 02004_max_hyperscan_regex_length - - 01176_mysql_client_interactive # requires mysql client - 01031_mutations_interpreter_and_context - 01053_ssd_dictionary # this test mistakenly requires acces to /var/lib/clickhouse -- can't run this locally, disabled - 01083_expressions_in_engine_arguments - 01092_memory_profiler - 01098_msgpack_format - 01098_temporary_and_external_tables - 01103_check_cpu_instructions_at_startup # avoid dependency on qemu -- invonvenient when running locally - 01193_metadata_loading - 01238_http_memory_tracking # max_memory_usage_for_user can interfere another queries running concurrently - 01251_dict_is_in_infinite_loop - 01259_dictionary_custom_settings_ddl - 01268_dictionary_direct_layout - 01280_ssd_complex_key_dictionary - 01281_group_by_limit_memory_tracking # max_memory_usage_for_user can interfere another queries running concurrently - 01318_encrypt # Depends on OpenSSL - 01318_decrypt # Depends on OpenSSL - 01663_aes_msan # Depends on OpenSSL - 01667_aes_args_check # Depends on OpenSSL - 01683_codec_encrypted # Depends on OpenSSL - 01776_decrypt_aead_size_check # Depends on OpenSSL - 01811_filter_by_null # Depends on OpenSSL - 01281_unsucceeded_insert_select_queries_counter - 01292_create_user - 01294_lazy_database_concurrent - 01305_replica_create_drop_zookeeper - 01354_order_by_tuple_collate_const - 01355_ilike - 01411_bayesian_ab_testing - 01798_uniq_theta_sketch - 01799_long_uniq_theta_sketch - 01890_stem # depends on libstemmer_c - 02003_compress_bz2 # depends on bzip2 - collate - collation - _orc_ - arrow - avro - base64 - brotli - capnproto - client - ddl_dictionaries - h3 - hashing - hdfs - java_hash - json - limit_memory - live_view - memory_leak - memory_limit - mysql - odbc - parallel_alter - parquet - protobuf - secure - sha256 - xz - - # Not sure why these two fail even in sequential mode. Disabled for now - # to make some progress. - 00646_url_engine - 00974_query_profiler - - # In fasttest, ENABLE_LIBRARIES=0, so rocksdb engine is not enabled by default - 01504_rocksdb - 01686_rocksdb - - # Look at DistributedFilesToInsert, so cannot run in parallel. - 01460_DistributedFilesToInsert - - 01541_max_memory_usage_for_user_long - - # Require python libraries like scipy, pandas and numpy - 01322_ttest_scipy - 01561_mann_whitney_scipy - - 01545_system_errors - # Checks system.errors - 01563_distributed_query_finish - - # nc - command not found - 01601_proxy_protocol - 01622_defaults_for_url_engine - - # JSON functions - 01666_blns - - # Requires postgresql-client - 01802_test_postgresql_protocol_with_row_policy - - # Depends on AWS - 01801_s3_cluster - - # needs psql - 01889_postgresql_protocol_null_fields - - # needs pv - 01923_network_receive_time_metric_insert - - 01889_sqlite_read_write - - # needs s2 - 01849_geoToS2 - 01851_s2_to_geo - 01852_s2_get_neighbours - 01853_s2_cells_intersect - 01854_s2_cap_contains - 01854_s2_cap_union - ) - - time clickhouse-test --hung-check -j 8 --order=random --use-skip-list \ - --no-long --testname --shard --zookeeper --skip "${TESTS_TO_SKIP[@]}" \ + time clickhouse-test --hung-check -j 8 --order=random \ + --fast-tests-only --no-long --testname --shard --zookeeper \ -- "$FASTTEST_FOCUS" 2>&1 \ | ts '%Y-%m-%d %H:%M:%S' \ - | tee "$FASTTEST_OUTPUT/test_log.txt" + | tee "$FASTTEST_OUTPUT/test_result.txt" } case "$stage" in @@ -447,6 +315,9 @@ case "$stage" in ;& "run_tests") run_tests + /process_functional_tests_result.py --in-results-dir "$FASTTEST_OUTPUT/" \ + --out-results-file "$FASTTEST_OUTPUT/test_results.tsv" \ + --out-status-file "$FASTTEST_OUTPUT/check_status.tsv" || echo -e "failure\tCannot parse results" > "$FASTTEST_OUTPUT/check_status.tsv" ;; *) echo "Unknown test stage '$stage'" diff --git a/docker/test/fuzzer/Dockerfile b/docker/test/fuzzer/Dockerfile index 57daba9cfd6..6444e745c47 100644 --- a/docker/test/fuzzer/Dockerfile +++ b/docker/test/fuzzer/Dockerfile @@ -1,10 +1,12 @@ -# docker build -t yandex/clickhouse-fuzzer . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/fuzzer . +FROM clickhouse/test-base ENV LANG=C.UTF-8 ENV TZ=Europe/Moscow RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \ ca-certificates \ @@ -14,6 +16,8 @@ RUN apt-get update \ p7zip-full \ parallel \ psmisc \ + python3 \ + python3-pip \ rsync \ tree \ tzdata \ @@ -23,6 +27,8 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN pip3 install Jinja2 + COPY * / SHELL ["/bin/bash", "-c"] @@ -30,5 +36,5 @@ CMD set -o pipefail \ && cd /workspace \ && /run-fuzzer.sh 2>&1 | ts "$(printf '%%Y-%%m-%%d %%H:%%M:%%S\t')" | tee main.log -# docker run --network=host --volume :/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> yandex/clickhouse-fuzzer +# docker run --network=host --volume :/workspace -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/fuzzer diff --git a/docker/test/fuzzer/generate-test-j2.py b/docker/test/fuzzer/generate-test-j2.py new file mode 100755 index 00000000000..bcc1bf6bc84 --- /dev/null +++ b/docker/test/fuzzer/generate-test-j2.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 + +from argparse import ArgumentParser +import os +import jinja2 + + +def removesuffix(text, suffix): + """ + Added in python 3.9 + https://www.python.org/dev/peps/pep-0616/ + """ + if suffix and text.endswith(suffix): + return text[:-len(suffix)] + else: + return text[:] + + +def render_test_template(j2env, suite_dir, test_name): + """ + Render template for test and reference file if needed + """ + + test_base_name = removesuffix(test_name, ".sql.j2") + + reference_file_name = test_base_name + ".reference.j2" + reference_file_path = os.path.join(suite_dir, reference_file_name) + if os.path.isfile(reference_file_path): + tpl = j2env.get_template(reference_file_name) + tpl.stream().dump(os.path.join(suite_dir, test_base_name) + ".gen.reference") + + if test_name.endswith(".sql.j2"): + tpl = j2env.get_template(test_name) + generated_test_name = test_base_name + ".gen.sql" + tpl.stream().dump(os.path.join(suite_dir, generated_test_name)) + return generated_test_name + + return test_name + + +def main(args): + suite_dir = args.path + + print(f"Scanning {suite_dir} directory...") + + j2env = jinja2.Environment( + loader=jinja2.FileSystemLoader(suite_dir), + keep_trailing_newline=True, + ) + + test_names = os.listdir(suite_dir) + for test_name in test_names: + if not test_name.endswith(".sql.j2"): + continue + new_name = render_test_template(j2env, suite_dir, test_name) + print(f"File {new_name} generated") + + +if __name__ == "__main__": + parser = ArgumentParser(description="Jinja2 test generator") + parser.add_argument("-p", "--path", help="Path to test dir", required=True) + main(parser.parse_args()) diff --git a/docker/test/fuzzer/query-fuzzer-tweaks-users.xml b/docker/test/fuzzer/query-fuzzer-tweaks-users.xml index dd6b7467afc..2f09573f942 100644 --- a/docker/test/fuzzer/query-fuzzer-tweaks-users.xml +++ b/docker/test/fuzzer/query-fuzzer-tweaks-users.xml @@ -1,4 +1,4 @@ - + 10 @@ -17,4 +17,4 @@ - + diff --git a/docker/test/fuzzer/run-fuzzer.sh b/docker/test/fuzzer/run-fuzzer.sh index 44183a50ae5..9fec60e79f7 100755 --- a/docker/test/fuzzer/run-fuzzer.sh +++ b/docker/test/fuzzer/run-fuzzer.sh @@ -1,5 +1,5 @@ #!/bin/bash -# shellcheck disable=SC2086 +# shellcheck disable=SC2086,SC2001 set -eux set -o pipefail @@ -12,7 +12,7 @@ stage=${stage:-} script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" echo "$script_dir" repo_dir=ch -BINARY_TO_DOWNLOAD=${BINARY_TO_DOWNLOAD:="clang-11_debug_none_bundled_unsplitted_disable_False_binary"} +BINARY_TO_DOWNLOAD=${BINARY_TO_DOWNLOAD:="clang-13_debug_none_bundled_unsplitted_disable_False_binary"} function clone { @@ -71,12 +71,15 @@ function watchdog kill -9 -- $fuzzer_pid ||: } -function filter_exists +function filter_exists_and_template { local path for path in "$@"; do if [ -e "$path" ]; then - echo "$path" + # SC2001 shellcheck suggests: + # echo ${path//.sql.j2/.gen.sql} + # but it doesn't allow to use regex + echo "$path" | sed 's/\.sql\.j2$/.gen.sql/' else echo "'$path' does not exists" >&2 fi @@ -85,11 +88,13 @@ function filter_exists function fuzz { + /generate-test-j2.py --path ch/tests/queries/0_stateless + # Obtain the list of newly added tests. They will be fuzzed in more extreme way than other tests. # Don't overwrite the NEW_TESTS_OPT so that it can be set from the environment. - NEW_TESTS="$(sed -n 's!\(^tests/queries/0_stateless/.*\.sql\)$!ch/\1!p' ci-changed-files.txt | sort -R)" + NEW_TESTS="$(sed -n 's!\(^tests/queries/0_stateless/.*\.sql\(\.j2\)\?\)$!ch/\1!p' ci-changed-files.txt | sort -R)" # ci-changed-files.txt contains also files that has been deleted/renamed, filter them out. - NEW_TESTS="$(filter_exists $NEW_TESTS)" + NEW_TESTS="$(filter_exists_and_template $NEW_TESTS)" if [[ -n "$NEW_TESTS" ]] then NEW_TESTS_OPT="${NEW_TESTS_OPT:---interleave-queries-file ${NEW_TESTS}}" @@ -134,6 +139,7 @@ continue clickhouse-client \ --receive_timeout=10 \ --receive_data_timeout_ms=10000 \ + --stacktrace \ --query-fuzzer-runs=1000 \ --queries-file $(ls -1 ch/tests/queries/0_stateless/*.sql | sort -R) \ $NEW_TESTS_OPT \ diff --git a/docker/test/integration/base/Dockerfile b/docker/test/integration/base/Dockerfile index 344c1b9a698..519c64297e5 100644 --- a/docker/test/integration/base/Dockerfile +++ b/docker/test/integration/base/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-integration-test . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/integration-test . +FROM clickhouse/test-base SHELL ["/bin/bash", "-c"] diff --git a/docker/test/integration/helper_container/Dockerfile b/docker/test/integration/helper_container/Dockerfile index 922eb2c6f22..6a093081bf2 100644 --- a/docker/test/integration/helper_container/Dockerfile +++ b/docker/test/integration/helper_container/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-integration-helper . +# docker build -t clickhouse/integration-helper . # Helper docker container to run iptables without sudo FROM alpine diff --git a/docker/test/integration/kerberized_hadoop/Dockerfile b/docker/test/integration/kerberized_hadoop/Dockerfile index 6a2fd96e7a7..11da590f901 100644 --- a/docker/test/integration/kerberized_hadoop/Dockerfile +++ b/docker/test/integration/kerberized_hadoop/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-kerberized-hadoop . +# docker build -t clickhouse/kerberized-hadoop . FROM sequenceiq/hadoop-docker:2.7.0 RUN sed -i -e 's/^\#baseurl/baseurl/' /etc/yum.repos.d/CentOS-Base.repo diff --git a/docker/test/integration/kerberos_kdc/Dockerfile b/docker/test/integration/kerberos_kdc/Dockerfile index ea231b1191d..a203c33a331 100644 --- a/docker/test/integration/kerberos_kdc/Dockerfile +++ b/docker/test/integration/kerberos_kdc/Dockerfile @@ -1,9 +1,9 @@ -# docker build -t yandex/clickhouse-kerberos-kdc . +# docker build -t clickhouse/kerberos-kdc . +FROM centos:6 -FROM centos:6.6 -# old OS to make is faster and smaller +RUN sed -i '/^mirrorlist/s/^/#/;/^#baseurl/{s/#//;s/mirror.centos.org\/centos\/$releasever/vault.centos.org\/6.10/}' /etc/yum.repos.d/*B* -RUN yum install -y krb5-server krb5-libs krb5-auth-dialog krb5-workstation +RUN yum install -y ca-certificates krb5-server krb5-libs krb5-auth-dialog krb5-workstation EXPOSE 88 749 diff --git a/docker/test/integration/mysql_golang_client/Dockerfile b/docker/test/integration/mysql_golang_client/Dockerfile index 4380383d1fb..68b0aaab42c 100644 --- a/docker/test/integration/mysql_golang_client/Dockerfile +++ b/docker/test/integration/mysql_golang_client/Dockerfile @@ -1,7 +1,7 @@ -# docker build -t yandex/clickhouse-mysql-golang-client . +# docker build -t clickhouse/mysql-golang-client . # MySQL golang client docker container -FROM golang:1.12.2 +FROM golang:1.13 RUN go get "github.com/go-sql-driver/mysql" diff --git a/docker/test/integration/mysql_java_client/Dockerfile b/docker/test/integration/mysql_java_client/Dockerfile index fcb6a39f33b..0abf50cd493 100644 --- a/docker/test/integration/mysql_java_client/Dockerfile +++ b/docker/test/integration/mysql_java_client/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-mysql-java-client . +# docker build -t clickhouse/mysql-java-client . # MySQL Java client docker container FROM ubuntu:18.04 diff --git a/docker/test/integration/mysql_js_client/Dockerfile b/docker/test/integration/mysql_js_client/Dockerfile index 4f12de004ac..b1397b40d38 100644 --- a/docker/test/integration/mysql_js_client/Dockerfile +++ b/docker/test/integration/mysql_js_client/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-mysql-js-client . +# docker build -t clickhouse/mysql-js-client . # MySQL JavaScript client docker container FROM node:8 diff --git a/docker/test/integration/mysql_php_client/Dockerfile b/docker/test/integration/mysql_php_client/Dockerfile index e2ceb62f44f..0fb77bf8ffb 100644 --- a/docker/test/integration/mysql_php_client/Dockerfile +++ b/docker/test/integration/mysql_php_client/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-mysql-php-client . +# docker build -t clickhouse/mysql-php-client . # MySQL PHP client docker container FROM php:7.3-cli diff --git a/docker/test/integration/postgresql_java_client/Dockerfile b/docker/test/integration/postgresql_java_client/Dockerfile index eab236c9590..f5484028ec9 100644 --- a/docker/test/integration/postgresql_java_client/Dockerfile +++ b/docker/test/integration/postgresql_java_client/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-postgresql-java-client . +# docker build -t clickhouse/postgresql-java-client . # PostgreSQL Java client docker container FROM ubuntu:18.04 diff --git a/docker/test/integration/resolver/Dockerfile b/docker/test/integration/resolver/Dockerfile index b0efb4b46d5..01b9b777614 100644 --- a/docker/test/integration/resolver/Dockerfile +++ b/docker/test/integration/resolver/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-python-bottle . +# docker build -t clickhouse/python-bottle . # Helper docker container to run python bottle apps FROM python:3 diff --git a/docker/test/integration/runner/Dockerfile b/docker/test/integration/runner/Dockerfile index 6bde4ef60db..06e1f64ced2 100644 --- a/docker/test/integration/runner/Dockerfile +++ b/docker/test/integration/runner/Dockerfile @@ -1,6 +1,8 @@ -# docker build -t yandex/clickhouse-integration-tests-runner . +# docker build -t clickhouse/integration-tests-runner . FROM ubuntu:20.04 +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN apt-get update \ && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \ ca-certificates \ @@ -77,8 +79,9 @@ RUN python3 -m pip install \ pytest-timeout \ pytest-xdist \ pytest-repeat \ + pytz \ redis \ - tzlocal \ + tzlocal==2.1 \ urllib3 \ requests-kerberos \ pyhdfs @@ -95,6 +98,8 @@ RUN set -x \ && echo 'dockremap:165536:65536' >> /etc/subuid \ && echo 'dockremap:165536:65536' >> /etc/subgid +RUN echo '127.0.0.1 localhost test.com' >> /etc/hosts + EXPOSE 2375 ENTRYPOINT ["dockerd-entrypoint.sh"] CMD ["sh", "-c", "pytest $PYTEST_OPTS"] diff --git a/docker/test/integration/runner/compose/docker_compose_jdbc_bridge.yml b/docker/test/integration/runner/compose/docker_compose_jdbc_bridge.yml index a65ef629df6..b3686adc21c 100644 --- a/docker/test/integration/runner/compose/docker_compose_jdbc_bridge.yml +++ b/docker/test/integration/runner/compose/docker_compose_jdbc_bridge.yml @@ -1,7 +1,7 @@ version: '2.3' services: bridge1: - image: yandex/clickhouse-jdbc-bridge + image: clickhouse/jdbc-bridge command: | /bin/bash -c 'cat << EOF > config/datasources/self.json { diff --git a/docker/test/integration/runner/compose/docker_compose_keeper.yml b/docker/test/integration/runner/compose/docker_compose_keeper.yml index e11a13e6eab..134ffbff1f7 100644 --- a/docker/test/integration/runner/compose/docker_compose_keeper.yml +++ b/docker/test/integration/runner/compose/docker_compose_keeper.yml @@ -1,7 +1,7 @@ version: '2.3' services: zoo1: - image: ${image:-yandex/clickhouse-integration-test} + image: ${image:-clickhouse/integration-test} restart: always user: ${user:-} volumes: @@ -31,7 +31,7 @@ services: - inet6 - rotate zoo2: - image: ${image:-yandex/clickhouse-integration-test} + image: ${image:-clickhouse/integration-test} restart: always user: ${user:-} volumes: @@ -61,7 +61,7 @@ services: - inet6 - rotate zoo3: - image: ${image:-yandex/clickhouse-integration-test} + image: ${image:-clickhouse/integration-test} restart: always user: ${user:-} volumes: diff --git a/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml b/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml index b09e75a8515..88be3e45085 100644 --- a/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml +++ b/docker/test/integration/runner/compose/docker_compose_kerberized_hdfs.yml @@ -4,7 +4,7 @@ services: kerberizedhdfs1: cap_add: - DAC_READ_SEARCH - image: yandex/clickhouse-kerberized-hadoop:16621 + image: clickhouse/kerberized-hadoop hostname: kerberizedhdfs1 restart: always volumes: @@ -22,7 +22,7 @@ services: entrypoint: /etc/bootstrap.sh -d hdfskerberos: - image: yandex/clickhouse-kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG:-latest} + image: clickhouse/kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG:-latest} hostname: hdfskerberos volumes: - ${KERBERIZED_HDFS_DIR}/secrets:/tmp/keytab diff --git a/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml b/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml index 081b90c4f27..d57e4e4d5be 100644 --- a/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml +++ b/docker/test/integration/runner/compose/docker_compose_kerberized_kafka.yml @@ -50,7 +50,7 @@ services: - label:disable kafka_kerberos: - image: yandex/clickhouse-kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG:-latest} + image: clickhouse/kerberos-kdc:${DOCKER_KERBEROS_KDC_TAG:-latest} hostname: kafka_kerberos volumes: - ${KERBERIZED_KAFKA_DIR}/secrets:/tmp/keytab diff --git a/docker/test/integration/runner/compose/docker_compose_minio.yml b/docker/test/integration/runner/compose/docker_compose_minio.yml index 96a5f8bdc31..4384c0868a5 100644 --- a/docker/test/integration/runner/compose/docker_compose_minio.yml +++ b/docker/test/integration/runner/compose/docker_compose_minio.yml @@ -19,14 +19,14 @@ services: # HTTP proxies for Minio. proxy1: - image: yandex/clickhouse-s3-proxy + image: clickhouse/s3-proxy expose: - "8080" # Redirect proxy port - "80" # Reverse proxy port - "443" # Reverse proxy port (secure) proxy2: - image: yandex/clickhouse-s3-proxy + image: clickhouse/s3-proxy expose: - "8080" - "80" @@ -34,7 +34,7 @@ services: # Empty container to run proxy resolver. resolver: - image: yandex/clickhouse-python-bottle + image: clickhouse/python-bottle expose: - "8080" tty: true diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_golang_client.yml b/docker/test/integration/runner/compose/docker_compose_mysql_golang_client.yml index a6a338eb6a8..56cc0410574 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_golang_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_golang_client.yml @@ -1,6 +1,6 @@ version: '2.3' services: golang1: - image: yandex/clickhouse-mysql-golang-client:${DOCKER_MYSQL_GOLANG_CLIENT_TAG:-latest} + image: clickhouse/mysql-golang-client:${DOCKER_MYSQL_GOLANG_CLIENT_TAG:-latest} # to keep container running command: sleep infinity diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_java_client.yml b/docker/test/integration/runner/compose/docker_compose_mysql_java_client.yml index 21d927df82c..eb5ffb01baa 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_java_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_java_client.yml @@ -1,6 +1,6 @@ version: '2.3' services: java1: - image: yandex/clickhouse-mysql-java-client:${DOCKER_MYSQL_JAVA_CLIENT_TAG:-latest} + image: clickhouse/mysql-java-client:${DOCKER_MYSQL_JAVA_CLIENT_TAG:-latest} # to keep container running command: sleep infinity diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_js_client.yml b/docker/test/integration/runner/compose/docker_compose_mysql_js_client.yml index dbd85cf2382..90939449c5f 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_js_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_js_client.yml @@ -1,6 +1,6 @@ version: '2.3' services: mysqljs1: - image: yandex/clickhouse-mysql-js-client:${DOCKER_MYSQL_JS_CLIENT_TAG:-latest} + image: clickhouse/mysql-js-client:${DOCKER_MYSQL_JS_CLIENT_TAG:-latest} # to keep container running command: sleep infinity diff --git a/docker/test/integration/runner/compose/docker_compose_mysql_php_client.yml b/docker/test/integration/runner/compose/docker_compose_mysql_php_client.yml index f24f5337a7e..408b8ff089a 100644 --- a/docker/test/integration/runner/compose/docker_compose_mysql_php_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_mysql_php_client.yml @@ -1,6 +1,6 @@ version: '2.3' services: php1: - image: yandex/clickhouse-mysql-php-client:${DOCKER_MYSQL_PHP_CLIENT_TAG:-latest} + image: clickhouse/mysql-php-client:${DOCKER_MYSQL_PHP_CLIENT_TAG:-latest} # to keep container running command: sleep infinity diff --git a/docker/test/integration/runner/compose/docker_compose_nginx.yml b/docker/test/integration/runner/compose/docker_compose_nginx.yml new file mode 100644 index 00000000000..d0fb9fc1ff4 --- /dev/null +++ b/docker/test/integration/runner/compose/docker_compose_nginx.yml @@ -0,0 +1,11 @@ +version: '2.3' +services: + # nginx server to host static files. + # Accepts only PUT data by test.com/path and GET already existing data on test.com/path. + # Files will be put into /usr/share/nginx/files. + + nginx: + image: kssenii/nginx-test:1.1 + restart: always + ports: + - 80:80 diff --git a/docker/test/integration/runner/compose/docker_compose_postgresql_java_client.yml b/docker/test/integration/runner/compose/docker_compose_postgresql_java_client.yml index 38191f1bdd6..904bfffdfd5 100644 --- a/docker/test/integration/runner/compose/docker_compose_postgresql_java_client.yml +++ b/docker/test/integration/runner/compose/docker_compose_postgresql_java_client.yml @@ -1,6 +1,6 @@ version: '2.2' services: java: - image: yandex/clickhouse-postgresql-java-client:${DOCKER_POSTGRESQL_JAVA_CLIENT_TAG:-latest} + image: clickhouse/postgresql-java-client:${DOCKER_POSTGRESQL_JAVA_CLIENT_TAG:-latest} # to keep container running command: sleep infinity diff --git a/docker/test/integration/s3_proxy/Dockerfile b/docker/test/integration/s3_proxy/Dockerfile index d8b1754fa71..5858218e4e4 100644 --- a/docker/test/integration/s3_proxy/Dockerfile +++ b/docker/test/integration/s3_proxy/Dockerfile @@ -1,4 +1,4 @@ -# docker build -t yandex/clickhouse-s3-proxy . +# docker build -t clickhouse/s3-proxy . FROM nginx:alpine COPY run.sh /run.sh diff --git a/docker/test/keeper-jepsen/Dockerfile b/docker/test/keeper-jepsen/Dockerfile index 1a62d5e793f..5bb7f9433c2 100644 --- a/docker/test/keeper-jepsen/Dockerfile +++ b/docker/test/keeper-jepsen/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-keeper-jepsen-test . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/keeper-jepsen-test . +FROM clickhouse/test-base ENV DEBIAN_FRONTEND=noninteractive ENV CLOJURE_VERSION=1.10.3.814 diff --git a/docker/test/keeper-jepsen/run.sh b/docker/test/keeper-jepsen/run.sh index 352585e16e3..d7534270e2c 100644 --- a/docker/test/keeper-jepsen/run.sh +++ b/docker/test/keeper-jepsen/run.sh @@ -2,7 +2,7 @@ set -euo pipefail -CLICKHOUSE_PACKAGE=${CLICKHOUSE_PACKAGE:="https://clickhouse-builds.s3.yandex.net/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/clang-11_relwithdebuginfo_none_bundled_unsplitted_disable_False_binary/clickhouse"} +CLICKHOUSE_PACKAGE=${CLICKHOUSE_PACKAGE:="https://clickhouse-builds.s3.yandex.net/$PR_TO_TEST/$SHA_TO_TEST/clickhouse_build_check/clang-13_relwithdebuginfo_none_bundled_unsplitted_disable_False_binary/clickhouse"} CLICKHOUSE_REPO_PATH=${CLICKHOUSE_REPO_PATH:=""} diff --git a/docker/test/performance-comparison/Dockerfile b/docker/test/performance-comparison/Dockerfile index 5ec048de657..88b66d42ecb 100644 --- a/docker/test/performance-comparison/Dockerfile +++ b/docker/test/performance-comparison/Dockerfile @@ -1,10 +1,12 @@ -# docker build -t yandex/clickhouse-performance-comparison . +# docker build -t clickhouse/performance-comparison . FROM ubuntu:18.04 ENV LANG=C.UTF-8 ENV TZ=Europe/Moscow RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \ bash \ @@ -52,4 +54,4 @@ COPY * / # it gives '/bin/sh: 1: [bash,: not found' otherwise. CMD ["bash", "-c", "node=$((RANDOM % $(numactl --hardware | sed -n 's/^.*available:\\(.*\\)nodes.*$/\\1/p'))); echo Will bind to NUMA node $node; numactl --cpunodebind=$node --membind=$node /entrypoint.sh"] -# docker run --network=host --volume :/workspace --volume=:/output -e PR_TO_TEST=<> -e SHA_TO_TEST=<> yandex/clickhouse-performance-comparison +# docker run --network=host --volume :/workspace --volume=:/output -e PR_TO_TEST=<> -e SHA_TO_TEST=<> clickhouse/performance-comparison diff --git a/docker/test/performance-comparison/README.md b/docker/test/performance-comparison/README.md index 782644a81dd..75213fad077 100644 --- a/docker/test/performance-comparison/README.md +++ b/docker/test/performance-comparison/README.md @@ -116,7 +116,7 @@ pull requests (0 for master) manually. docker run --network=host --volume=$(pwd)/workspace:/workspace --volume=$(pwd)/output:/output [-e REF_PR={} -e REF_SHA={}] -e PR_TO_TEST={} -e SHA_TO_TEST={} - yandex/clickhouse-performance-comparison + clickhouse/performance-comparison ``` Then see the `report.html` in the `output` directory. diff --git a/docker/test/performance-comparison/compare-releases.sh b/docker/test/performance-comparison/compare-releases.sh index 456661362b3..dc7681815d4 100755 --- a/docker/test/performance-comparison/compare-releases.sh +++ b/docker/test/performance-comparison/compare-releases.sh @@ -21,9 +21,9 @@ function download_package() # (version, path) version="$1" path="$2" cd "$path" - wget -nv -nd -nc "https://repo.clickhouse.tech/deb/stable/main/clickhouse-common-static-dbg_${version}_amd64.deb" ||: - wget -nv -nd -nc "https://repo.clickhouse.tech/deb/stable/main/clickhouse-common-static_${version}_amd64.deb" ||: - wget -nv -nd -nc "https://repo.clickhouse.tech/deb/stable/main/clickhouse-test_${version}_all.deb" ||: + wget -nv -nd -nc "https://repo.clickhouse.com/deb/stable/main/clickhouse-common-static-dbg_${version}_amd64.deb" ||: + wget -nv -nd -nc "https://repo.clickhouse.com/deb/stable/main/clickhouse-common-static_${version}_amd64.deb" ||: + wget -nv -nd -nc "https://repo.clickhouse.com/deb/stable/main/clickhouse-test_${version}_all.deb" ||: mkdir tmp ||: for x in *.deb; do dpkg-deb -x "$x" tmp ; done mv tmp/usr/bin/clickhouse ./clickhouse diff --git a/docker/test/performance-comparison/config/config.d/top_level_domains_lists.xml b/docker/test/performance-comparison/config/config.d/top_level_domains_lists.xml index 7b5e6a5638a..aa6214e439e 100644 --- a/docker/test/performance-comparison/config/config.d/top_level_domains_lists.xml +++ b/docker/test/performance-comparison/config/config.d/top_level_domains_lists.xml @@ -1,5 +1,5 @@ - + public_suffix_list.dat - + diff --git a/docker/test/performance-comparison/config/config.d/user_files.xml b/docker/test/performance-comparison/config/config.d/user_files.xml index 9dc8daab66b..c6a9091e056 100644 --- a/docker/test/performance-comparison/config/config.d/user_files.xml +++ b/docker/test/performance-comparison/config/config.d/user_files.xml @@ -1,4 +1,4 @@ - + /var/lib/clickhouse/user_files/ @@ -7,4 +7,4 @@ access/ - + diff --git a/docker/test/performance-comparison/config/config.d/zzz-perf-comparison-tweaks-config.xml b/docker/test/performance-comparison/config/config.d/zzz-perf-comparison-tweaks-config.xml index 7b941f844de..cc5dc3795bb 100644 --- a/docker/test/performance-comparison/config/config.d/zzz-perf-comparison-tweaks-config.xml +++ b/docker/test/performance-comparison/config/config.d/zzz-perf-comparison-tweaks-config.xml @@ -1,4 +1,4 @@ - + @@ -27,4 +27,4 @@ 10 true - + diff --git a/docker/test/performance-comparison/config/users.d/perf-comparison-tweaks-users.xml b/docker/test/performance-comparison/config/users.d/perf-comparison-tweaks-users.xml index 1f5218c2d10..a9ae31bf38c 100644 --- a/docker/test/performance-comparison/config/users.d/perf-comparison-tweaks-users.xml +++ b/docker/test/performance-comparison/config/users.d/perf-comparison-tweaks-users.xml @@ -1,4 +1,4 @@ - + 1 @@ -18,12 +18,12 @@ 12 - - 64Mi - - + 0 0 + + + 60 @@ -31,4 +31,4 @@ 1 - + diff --git a/docker/test/pvs/Dockerfile b/docker/test/pvs/Dockerfile index 7bd45ba4018..f4675d35819 100644 --- a/docker/test/pvs/Dockerfile +++ b/docker/test/pvs/Dockerfile @@ -1,6 +1,6 @@ -# docker build -t yandex/clickhouse-pvs-test . +# docker build -t clickhouse/pvs-test . -FROM yandex/clickhouse-binary-builder +FROM clickhouse/binary-builder RUN apt-get update --yes \ && apt-get install \ @@ -28,7 +28,7 @@ RUN apt-get update --yes \ ENV PKG_VERSION="pvs-studio-latest" RUN set -x \ - && export PUBKEY_HASHSUM="686e5eb8b3c543a5c54442c39ec876b6c2d912fe8a729099e600017ae53c877dda3368fe38ed7a66024fe26df6b5892a" \ + && export PUBKEY_HASHSUM="ad369a2e9d8b8c30f5a9f2eb131121739b79c78e03fef0f016ea51871a5f78cd4e6257b270dca0ac3be3d1f19d885516" \ && wget -nv https://files.viva64.com/etc/pubkey.txt -O /tmp/pubkey.txt \ && echo "${PUBKEY_HASHSUM} /tmp/pubkey.txt" | sha384sum -c \ && apt-key add /tmp/pubkey.txt \ @@ -38,7 +38,7 @@ RUN set -x \ && dpkg -i "${PKG_VERSION}.deb" CMD echo "Running PVS version $PKG_VERSION" && cd /repo_folder && pvs-studio-analyzer credentials $LICENCE_NAME $LICENCE_KEY -o ./licence.lic \ - && cmake . -D"ENABLE_EMBEDDED_COMPILER"=OFF -D"USE_INTERNAL_PROTOBUF_LIBRARY"=OFF -D"USE_INTERNAL_GRPC_LIBRARY"=OFF \ + && cmake . -D"ENABLE_EMBEDDED_COMPILER"=OFF -D"USE_INTERNAL_PROTOBUF_LIBRARY"=OFF -D"USE_INTERNAL_GRPC_LIBRARY"=OFF -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang\+\+-13 \ && ninja re2_st clickhouse_grpc_protos \ && pvs-studio-analyzer analyze -o pvs-studio.log -e contrib -j 4 -l ./licence.lic; \ cp /repo_folder/pvs-studio.log /test_output; \ diff --git a/docker/test/split_build_smoke_test/Dockerfile b/docker/test/split_build_smoke_test/Dockerfile index 54a9eb17868..3cc2f26a507 100644 --- a/docker/test/split_build_smoke_test/Dockerfile +++ b/docker/test/split_build_smoke_test/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-split-build-smoke-test . -FROM yandex/clickhouse-binary-builder +# docker build -t clickhouse/split-build-smoke-test . +FROM clickhouse/binary-builder COPY run.sh /run.sh COPY process_split_build_smoke_test_result.py / diff --git a/docker/test/sqlancer/Dockerfile b/docker/test/sqlancer/Dockerfile index 253ca1b729a..e73fd03fb6d 100644 --- a/docker/test/sqlancer/Dockerfile +++ b/docker/test/sqlancer/Dockerfile @@ -1,7 +1,9 @@ -# docker build -t yandex/clickhouse-sqlancer-test . +# docker build -t clickhouse/sqlancer-test . FROM ubuntu:20.04 -RUN apt-get update --yes && env DEBIAN_FRONTEND=noninteractive apt-get install wget unzip git openjdk-14-jdk maven python3 --yes --no-install-recommends +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + +RUN apt-get update --yes && env DEBIAN_FRONTEND=noninteractive apt-get install wget unzip git default-jdk maven python3 --yes --no-install-recommends RUN wget https://github.com/sqlancer/sqlancer/archive/master.zip -O /sqlancer.zip RUN mkdir /sqlancer && \ cd /sqlancer && \ diff --git a/docker/test/stateful/Dockerfile b/docker/test/stateful/Dockerfile index 07aad75a2ea..c237a712f52 100644 --- a/docker/test/stateful/Dockerfile +++ b/docker/test/stateful/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-stateful-test . -FROM yandex/clickhouse-stateless-test +# docker build -t clickhouse/stateful-test . +FROM clickhouse/stateless-test RUN apt-get update -y \ && env DEBIAN_FRONTEND=noninteractive \ diff --git a/docker/test/stateful/run.sh b/docker/test/stateful/run.sh index de058469192..dd5984fd7b5 100755 --- a/docker/test/stateful/run.sh +++ b/docker/test/stateful/run.sh @@ -108,7 +108,7 @@ function run_tests() ADDITIONAL_OPTIONS+=('--replicated-database') fi - clickhouse-test --testname --shard --zookeeper --no-stateless --hung-check --use-skip-list --print-time "${ADDITIONAL_OPTIONS[@]}" \ + clickhouse-test --testname --shard --zookeeper --no-stateless --hung-check --print-time "${ADDITIONAL_OPTIONS[@]}" \ "$SKIP_TESTS_OPTION" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee test_output/test_result.txt } diff --git a/docker/test/stateful/s3downloader b/docker/test/stateful/s3downloader index 363ece8dac6..eb3b3cd9faf 100755 --- a/docker/test/stateful/s3downloader +++ b/docker/test/stateful/s3downloader @@ -92,7 +92,7 @@ if __name__ == "__main__": logging.info("Some exception occured %s", str(ex)) raise finally: - logging.info("Will remove dowloaded file %s from filesystem if it exists", temp_archive_path) + logging.info("Will remove downloaded file %s from filesystem if it exists", temp_archive_path) if os.path.exists(temp_archive_path): os.remove(temp_archive_path) logging.info("Processing of %s finished", dataset) diff --git a/docker/test/stateless/Dockerfile b/docker/test/stateless/Dockerfile index f5fa86a6f33..7de8c061673 100644 --- a/docker/test/stateless/Dockerfile +++ b/docker/test/stateless/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-stateless-test . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/stateless-test . +FROM clickhouse/test-base ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.4.20200302/clickhouse-odbc-1.1.4-Linux.tar.gz" @@ -24,6 +24,8 @@ RUN apt-get update -y \ python3-pip \ qemu-user-static \ sudo \ + # golang version 1.13 on Ubuntu 20 is enough for tests + golang \ telnet \ tree \ unixodbc \ @@ -47,6 +49,16 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV NUM_TRIES=1 ENV MAX_RUN_TIME=0 + +# Download Minio-related binaries +RUN wget 'https://dl.min.io/server/minio/release/linux-amd64/minio' \ + && chmod +x ./minio \ + && wget 'https://dl.min.io/client/mc/release/linux-amd64/mc' \ + && chmod +x ./mc + +ENV MINIO_ROOT_USER="clickhouse" +ENV MINIO_ROOT_PASSWORD="clickhouse" + COPY run.sh / -COPY process_functional_tests_result.py / +COPY setup_minio.sh / CMD ["/bin/bash", "/run.sh"] diff --git a/docker/test/stateless/run.sh b/docker/test/stateless/run.sh index e5ef72e747a..ed721690281 100755 --- a/docker/test/stateless/run.sh +++ b/docker/test/stateless/run.sh @@ -17,6 +17,8 @@ dpkg -i package_folder/clickhouse-test_*.deb # install test configs /usr/share/clickhouse-test/config/install.sh +./setup_minio.sh + # For flaky check we also enable thread fuzzer if [ "$NUM_TRIES" -gt "1" ]; then export THREAD_FUZZER_CPU_TIME_PERIOD_US=1000 @@ -95,7 +97,7 @@ function run_tests() fi clickhouse-test --testname --shard --zookeeper --hung-check --print-time \ - --use-skip-list --test-runs "$NUM_TRIES" "${ADDITIONAL_OPTIONS[@]}" 2>&1 \ + --test-runs "$NUM_TRIES" "${ADDITIONAL_OPTIONS[@]}" 2>&1 \ | ts '%Y-%m-%d %H:%M:%S' \ | tee -a test_output/test_result.txt } diff --git a/docker/test/stateless/setup_minio.sh b/docker/test/stateless/setup_minio.sh new file mode 100755 index 00000000000..7f8b90ee741 --- /dev/null +++ b/docker/test/stateless/setup_minio.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# Usage for local run: +# +# ./docker/test/stateless/setup_minio.sh ./tests/ +# + +set -e -x -a -u + +ls -lha + +mkdir -p ./minio_data + +if [ ! -f ./minio ]; then + echo 'MinIO binary not found, downloading...' + + BINARY_TYPE=$(uname -s | tr '[:upper:]' '[:lower:]') + + wget "https://dl.min.io/server/minio/release/${BINARY_TYPE}-amd64/minio" \ + && chmod +x ./minio \ + && wget "https://dl.min.io/client/mc/release/${BINARY_TYPE}-amd64/mc" \ + && chmod +x ./mc +fi + +MINIO_ROOT_USER=${MINIO_ROOT_USER:-clickhouse} +MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-clickhouse} + +./minio server --address ":11111" ./minio_data & + +while ! curl -v --silent http://localhost:11111 2>&1 | grep AccessDenied +do + echo "Trying to connect to minio" + sleep 1 +done + +lsof -i :11111 + +sleep 5 + +./mc alias set clickminio http://localhost:11111 clickhouse clickhouse +./mc admin user add clickminio test testtest +./mc admin policy set clickminio readwrite user=test +./mc mb clickminio/test + + +# Upload data to Minio. By default after unpacking all tests will in +# /usr/share/clickhouse-test/queries + +TEST_PATH=${1:-/usr/share/clickhouse-test} +MINIO_DATA_PATH=${TEST_PATH}/queries/0_stateless/data_minio + +# Iterating over globs will cause redudant FILE variale to be a path to a file, not a filename +# shellcheck disable=SC2045 +for FILE in $(ls "${MINIO_DATA_PATH}"); do + echo "$FILE"; + ./mc cp "${MINIO_DATA_PATH}"/"$FILE" clickminio/test/"$FILE"; +done diff --git a/docker/test/stateless_pytest/Dockerfile b/docker/test/stateless_pytest/Dockerfile index 947a70426d6..c1e47523f6d 100644 --- a/docker/test/stateless_pytest/Dockerfile +++ b/docker/test/stateless_pytest/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-stateless-pytest . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/stateless-pytest . +FROM clickhouse/test-base RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ diff --git a/docker/test/stateless_unbundled/Dockerfile b/docker/test/stateless_unbundled/Dockerfile index 53857a90ac7..dfe441e08a6 100644 --- a/docker/test/stateless_unbundled/Dockerfile +++ b/docker/test/stateless_unbundled/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-stateless-unbundled-test . -FROM yandex/clickhouse-test-base +# docker build -t clickhouse/stateless-unbundled-test . +FROM clickhouse/test-base ARG odbc_driver_url="https://github.com/ClickHouse/clickhouse-odbc/releases/download/v1.1.4.20200302/clickhouse-odbc-1.1.4-Linux.tar.gz" diff --git a/docker/test/stateless_unbundled/run.sh b/docker/test/stateless_unbundled/run.sh index 8b8612d4211..f8396706ed2 100755 --- a/docker/test/stateless_unbundled/run.sh +++ b/docker/test/stateless_unbundled/run.sh @@ -13,8 +13,4 @@ dpkg -i package_folder/clickhouse-test_*.deb service clickhouse-server start && sleep 5 -if grep -q -- "--use-skip-list" /usr/bin/clickhouse-test; then - SKIP_LIST_OPT="--use-skip-list" -fi - -clickhouse-test --testname --shard --zookeeper "$SKIP_LIST_OPT" "$ADDITIONAL_OPTIONS" "$SKIP_TESTS_OPTION" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee test_output/test_result.txt +clickhouse-test --testname --shard --zookeeper "$ADDITIONAL_OPTIONS" "$SKIP_TESTS_OPTION" 2>&1 | ts '%Y-%m-%d %H:%M:%S' | tee test_output/test_result.txt diff --git a/docker/test/stress/Dockerfile b/docker/test/stress/Dockerfile index e1df32ec3d7..3fe1b790d5a 100644 --- a/docker/test/stress/Dockerfile +++ b/docker/test/stress/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-stress-test . -FROM yandex/clickhouse-stateful-test +# docker build -t clickhouse/stress-test . +FROM clickhouse/stateful-test RUN apt-get update -y \ && env DEBIAN_FRONTEND=noninteractive \ diff --git a/docker/test/stress/README.md b/docker/test/stress/README.md index f747996fa2d..b1519e7968d 100644 --- a/docker/test/stress/README.md +++ b/docker/test/stress/README.md @@ -6,7 +6,7 @@ Usage: ``` $ ls $HOME/someclickhouse clickhouse-client_18.14.9_all.deb clickhouse-common-static_18.14.9_amd64.deb clickhouse-server_18.14.9_all.deb clickhouse-test_18.14.9_all.deb -$ docker run --volume=$HOME/someclickhouse:/package_folder --volume=$HOME/test_output:/test_output yandex/clickhouse-stress-test +$ docker run --volume=$HOME/someclickhouse:/package_folder --volume=$HOME/test_output:/test_output clickhouse/stress-test Selecting previously unselected package clickhouse-common-static. (Reading database ... 14442 files and directories currently installed.) ... diff --git a/docker/test/stress/run.sh b/docker/test/stress/run.sh index 87d127ab946..afdc026732f 100755 --- a/docker/test/stress/run.sh +++ b/docker/test/stress/run.sh @@ -4,6 +4,28 @@ set -x +# Thread Fuzzer allows to check more permutations of possible thread scheduling +# and find more potential issues. + +export THREAD_FUZZER_CPU_TIME_PERIOD_US=1000 +export THREAD_FUZZER_SLEEP_PROBABILITY=0.1 +export THREAD_FUZZER_SLEEP_TIME_US=100000 + +export THREAD_FUZZER_pthread_mutex_lock_BEFORE_MIGRATE_PROBABILITY=1 +export THREAD_FUZZER_pthread_mutex_lock_AFTER_MIGRATE_PROBABILITY=1 +export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_MIGRATE_PROBABILITY=1 +export THREAD_FUZZER_pthread_mutex_unlock_AFTER_MIGRATE_PROBABILITY=1 + +export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_PROBABILITY=0.001 +export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_PROBABILITY=0.001 +export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_PROBABILITY=0.001 +export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_PROBABILITY=0.001 +export THREAD_FUZZER_pthread_mutex_lock_BEFORE_SLEEP_TIME_US=10000 +export THREAD_FUZZER_pthread_mutex_lock_AFTER_SLEEP_TIME_US=10000 +export THREAD_FUZZER_pthread_mutex_unlock_BEFORE_SLEEP_TIME_US=10000 +export THREAD_FUZZER_pthread_mutex_unlock_AFTER_SLEEP_TIME_US=10000 + + dpkg -i package_folder/clickhouse-common-static_*.deb dpkg -i package_folder/clickhouse-common-static-dbg_*.deb dpkg -i package_folder/clickhouse-server_*.deb @@ -53,12 +75,12 @@ function start() counter=0 until clickhouse-client --query "SELECT 1" do - if [ "$counter" -gt 120 ] + if [ "$counter" -gt 240 ] then echo "Cannot start clickhouse-server" cat /var/log/clickhouse-server/stdout.log tail -n1000 /var/log/clickhouse-server/stderr.log - tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | grep -F -v ' RaftInstance:' -e ' RaftInstance' | tail -n1000 + tail -n100000 /var/log/clickhouse-server/clickhouse-server.log | grep -F -v -e ' RaftInstance:' -e ' RaftInstance' | tail -n1000 break fi # use root to match with current uid diff --git a/docker/test/stress/stress b/docker/test/stress/stress index c71722809d7..8fc4ade2da6 100755 --- a/docker/test/stress/stress +++ b/docker/test/stress/stress @@ -10,14 +10,6 @@ import logging import time -def get_skip_list_cmd(path): - with open(path, 'r') as f: - for line in f: - if '--use-skip-list' in line: - return '--use-skip-list' - return '' - - def get_options(i): options = [] client_options = [] @@ -56,8 +48,6 @@ def get_options(i): def run_func_test(cmd, output_prefix, num_processes, skip_tests_option, global_time_limit): - skip_list_opt = get_skip_list_cmd(cmd) - global_time_limit_option = '' if global_time_limit: global_time_limit_option = "--global_time_limit={}".format(global_time_limit) @@ -66,7 +56,7 @@ def run_func_test(cmd, output_prefix, num_processes, skip_tests_option, global_t pipes = [] for i in range(0, len(output_paths)): f = open(output_paths[i], 'w') - full_command = "{} {} {} {} {}".format(cmd, skip_list_opt, get_options(i), global_time_limit_option, skip_tests_option) + full_command = "{} {} {} {}".format(cmd, get_options(i), global_time_limit_option, skip_tests_option) logging.info("Run func tests '%s'", full_command) p = Popen(full_command, shell=True, stdout=f, stderr=f) pipes.append(p) @@ -80,6 +70,9 @@ def compress_stress_logs(output_path, files_prefix): def prepare_for_hung_check(drop_databases): # FIXME this function should not exist, but... + # ThreadFuzzer significantly slows down server and causes false-positive hung check failures + call("clickhouse client -q 'SYSTEM STOP THREAD FUZZER'", shell=True, stderr=STDOUT) + # We attach gdb to clickhouse-server before running tests # to print stacktraces of all crashes even if clickhouse cannot print it for some reason. # However, it obstruct checking for hung queries. diff --git a/docker/test/style/Dockerfile b/docker/test/style/Dockerfile index 86595a77a54..33cdb9db57a 100644 --- a/docker/test/style/Dockerfile +++ b/docker/test/style/Dockerfile @@ -1,6 +1,8 @@ -# docker build -t yandex/clickhouse-style-test . +# docker build -t clickhouse/style-test . FROM ubuntu:20.04 +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \ shellcheck \ libxml2-utils \ diff --git a/docker/test/test_runner.sh b/docker/test/test_runner.sh index cd6367b2964..0c99c8c2b32 100755 --- a/docker/test/test_runner.sh +++ b/docker/test/test_runner.sh @@ -49,7 +49,7 @@ fi # Build server image (optional) from local packages if [ -z "${CLICKHOUSE_SERVER_IMAGE}" ]; then - CLICKHOUSE_SERVER_IMAGE="yandex/clickhouse-server:local" + CLICKHOUSE_SERVER_IMAGE="clickhouse/server:local" if [ "${CLICKHOUSE_PACKAGES_ARG}" != "${NO_REBUILD_FLAG}" ]; then docker build --network=host \ diff --git a/docker/test/testflows/runner/Dockerfile b/docker/test/testflows/runner/Dockerfile index 264b98c669d..91d0eb844d9 100644 --- a/docker/test/testflows/runner/Dockerfile +++ b/docker/test/testflows/runner/Dockerfile @@ -1,6 +1,8 @@ -# docker build -t yandex/clickhouse-testflows-runner . +# docker build -t clickhouse/testflows-runner . FROM ubuntu:20.04 +RUN sed -i 's|http://archive|http://ru.archive|g' /etc/apt/sources.list + RUN apt-get update \ && env DEBIAN_FRONTEND=noninteractive apt-get install --yes \ ca-certificates \ @@ -35,7 +37,7 @@ RUN apt-get update \ ENV TZ=Europe/Moscow RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -RUN pip3 install urllib3 testflows==1.7.20 docker-compose==1.29.1 docker==5.0.0 dicttoxml kazoo tzlocal python-dateutil numpy +RUN pip3 install urllib3 testflows==1.7.20 docker-compose==1.29.1 docker==5.0.0 dicttoxml kazoo tzlocal==2.1 pytz python-dateutil numpy ENV DOCKER_CHANNEL stable ENV DOCKER_VERSION 20.10.6 diff --git a/docker/test/unit/Dockerfile b/docker/test/unit/Dockerfile index e111611eecd..20d67773363 100644 --- a/docker/test/unit/Dockerfile +++ b/docker/test/unit/Dockerfile @@ -1,5 +1,5 @@ -# docker build -t yandex/clickhouse-unit-test . -FROM yandex/clickhouse-stateless-test +# docker build -t clickhouse/unit-test . +FROM clickhouse/stateless-test RUN apt-get install gdb diff --git a/docker/test/util/Dockerfile b/docker/test/util/Dockerfile new file mode 100644 index 00000000000..d9894451528 --- /dev/null +++ b/docker/test/util/Dockerfile @@ -0,0 +1,4 @@ +# docker build -t clickhouse/test-util . + +FROM ubuntu:20.04 +COPY process_functional_tests_result.py / diff --git a/docker/test/stateless/process_functional_tests_result.py b/docker/test/util/process_functional_tests_result.py similarity index 100% rename from docker/test/stateless/process_functional_tests_result.py rename to docker/test/util/process_functional_tests_result.py diff --git a/docs/README.md b/docs/README.md index d71e92f20d1..cd5c1af0cbd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -38,7 +38,7 @@ Writing the docs is extremely useful for project's users and developers, and gro The documentation contains information about all the aspects of the ClickHouse lifecycle: developing, testing, installing, operating, and using. The base language of the documentation is English. The English version is the most actual. All other languages are supported as much as they can by contributors from different countries. -At the moment, [documentation](https://clickhouse.tech/docs) exists in English, Russian, Chinese, Japanese, and Farsi. We store the documentation besides the ClickHouse source code in the [GitHub repository](https://github.com/ClickHouse/ClickHouse/tree/master/docs). +At the moment, [documentation](https://clickhouse.com/docs) exists in English, Russian, Chinese, Japanese, and Farsi. We store the documentation besides the ClickHouse source code in the [GitHub repository](https://github.com/ClickHouse/ClickHouse/tree/master/docs). Each language lays in the corresponding folder. Files that are not translated from English are the symbolic links to the English ones. @@ -54,7 +54,7 @@ You can contribute to the documentation in many ways, for example: - Open a required file in the ClickHouse repository and edit it from the GitHub web interface. - You can do it on GitHub, or on the [ClickHouse Documentation](https://clickhouse.tech/docs/en/) site. Each page of ClickHouse Documentation site contains an "Edit this page" (🖋) element in the upper right corner. Clicking this symbol, you get to the ClickHouse docs file opened for editing. + You can do it on GitHub, or on the [ClickHouse Documentation](https://clickhouse.com/docs/en/) site. Each page of ClickHouse Documentation site contains an "Edit this page" (🖋) element in the upper right corner. Clicking this symbol, you get to the ClickHouse docs file opened for editing. When you are saving a file, GitHub opens a pull-request for your contribution. Add the `documentation` label to this pull request for proper automatic checks applying. If you have no permissions for adding labels, the reviewer of your PR adds it. @@ -128,7 +128,7 @@ Contribute all new information in English language. Other languages are translat When you add a new file, it should end with a link like: -`[Original article](https://clickhouse.tech/docs/) ` +`[Original article](https://clickhouse.com/docs/) ` and there should be **a new empty line** after it. @@ -164,7 +164,7 @@ When writing documentation, think about people who read it. Each audience has sp ClickHouse documentation can be divided by the audience for the following parts: -- Conceptual topics in [Introduction](https://clickhouse.tech/docs/en/), tutorials and overviews, changelog. +- Conceptual topics in [Introduction](https://clickhouse.com/docs/en/), tutorials and overviews, changelog. These topics are for the most common auditory. When editing text in them, use the most common terms that are comfortable for the audience with basic technical skills. diff --git a/docs/_description_templates/template-data-type.md b/docs/_description_templates/template-data-type.md index d39be305838..239edb2808b 100644 --- a/docs/_description_templates/template-data-type.md +++ b/docs/_description_templates/template-data-type.md @@ -26,4 +26,4 @@ The name of an additional section can be any, for example, **Usage**. - [link](#) -[Original article](https://clickhouse.tech/docs/en/data-types//) +[Original article](https://clickhouse.com/docs/en/data-types//) diff --git a/docs/_description_templates/template-statement.md b/docs/_description_templates/template-statement.md index bca015a2ac6..238570c2217 100644 --- a/docs/_description_templates/template-statement.md +++ b/docs/_description_templates/template-statement.md @@ -12,9 +12,9 @@ Syntax of the statement. Examples of descriptions with a complicated structure: -- https://clickhouse.tech/docs/en/sql-reference/statements/grant/ -- https://clickhouse.tech/docs/en/sql-reference/statements/revoke/ -- https://clickhouse.tech/docs/en/sql-reference/statements/select/join/ +- https://clickhouse.com/docs/en/sql-reference/statements/grant/ +- https://clickhouse.com/docs/en/sql-reference/statements/revoke/ +- https://clickhouse.com/docs/en/sql-reference/statements/select/join/ **See Also** (Optional) diff --git a/docs/_includes/install/arm.sh b/docs/_includes/install/arm.sh index d6f6020a1a1..c6b1f7d12f8 100644 --- a/docs/_includes/install/arm.sh +++ b/docs/_includes/install/arm.sh @@ -1,6 +1,6 @@ # ARM (AArch64) build works on Amazon Graviton, Oracle Cloud, Huawei Cloud ARM machines. # The support for AArch64 is pre-production ready. -wget 'https://builds.clickhouse.tech/master/aarch64/clickhouse' +wget 'https://builds.clickhouse.com/master/aarch64/clickhouse' chmod a+x ./clickhouse sudo ./clickhouse install diff --git a/docs/_includes/install/deb.sh b/docs/_includes/install/deb.sh index 6686a1f64cd..7dcca601d33 100644 --- a/docs/_includes/install/deb.sh +++ b/docs/_includes/install/deb.sh @@ -1,7 +1,7 @@ sudo apt-get install apt-transport-https ca-certificates dirmngr sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4 -echo "deb https://repo.clickhouse.tech/deb/stable/ main/" | sudo tee \ +echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee \ /etc/apt/sources.list.d/clickhouse.list sudo apt-get update diff --git a/docs/_includes/install/freebsd.sh b/docs/_includes/install/freebsd.sh index d664ea19a18..50e3bc02cb7 100644 --- a/docs/_includes/install/freebsd.sh +++ b/docs/_includes/install/freebsd.sh @@ -1,3 +1,3 @@ -wget 'https://builds.clickhouse.tech/master/freebsd/clickhouse' +wget 'https://builds.clickhouse.com/master/freebsd/clickhouse' chmod a+x ./clickhouse sudo ./clickhouse install diff --git a/docs/_includes/install/mac-arm.sh b/docs/_includes/install/mac-arm.sh index 9fc5c0cef22..5863d5b090d 100644 --- a/docs/_includes/install/mac-arm.sh +++ b/docs/_includes/install/mac-arm.sh @@ -1,3 +1,3 @@ -wget 'https://builds.clickhouse.tech/master/macos-aarch64/clickhouse' +wget 'https://builds.clickhouse.com/master/macos-aarch64/clickhouse' chmod a+x ./clickhouse ./clickhouse diff --git a/docs/_includes/install/mac-x86.sh b/docs/_includes/install/mac-x86.sh index 1423769b6d5..2a216b534b4 100644 --- a/docs/_includes/install/mac-x86.sh +++ b/docs/_includes/install/mac-x86.sh @@ -1,3 +1,3 @@ -wget 'https://builds.clickhouse.tech/master/macos/clickhouse' +wget 'https://builds.clickhouse.com/master/macos/clickhouse' chmod a+x ./clickhouse ./clickhouse diff --git a/docs/_includes/install/rpm.sh b/docs/_includes/install/rpm.sh index 972d50124c4..de4a07420f7 100644 --- a/docs/_includes/install/rpm.sh +++ b/docs/_includes/install/rpm.sh @@ -1,6 +1,6 @@ sudo yum install yum-utils -sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG -sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/clickhouse.repo +sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG +sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/clickhouse.repo sudo yum install clickhouse-server clickhouse-client sudo /etc/init.d/clickhouse-server start diff --git a/docs/_includes/install/tgz.sh b/docs/_includes/install/tgz.sh index 52ea45bdf90..0994510755b 100644 --- a/docs/_includes/install/tgz.sh +++ b/docs/_includes/install/tgz.sh @@ -1,9 +1,9 @@ -export LATEST_VERSION=$(curl -s https://repo.clickhouse.tech/tgz/stable/ | \ +export LATEST_VERSION=$(curl -s https://repo.clickhouse.com/tgz/stable/ | \ grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | sort -V -r | head -n 1) -curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-common-static-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-common-static-dbg-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-server-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/stable/clickhouse-client-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/stable/clickhouse-common-static-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/stable/clickhouse-common-static-dbg-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/stable/clickhouse-server-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/stable/clickhouse-client-$LATEST_VERSION.tgz tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh diff --git a/docs/en/commercial/cloud.md b/docs/en/commercial/cloud.md index a30d17828ab..afa2e23b7a8 100644 --- a/docs/en/commercial/cloud.md +++ b/docs/en/commercial/cloud.md @@ -3,60 +3,7 @@ toc_priority: 1 toc_title: Cloud --- -# ClickHouse Cloud Service Providers {#clickhouse-cloud-service-providers} +# ClickHouse Cloud Service {#clickhouse-cloud-service} !!! info "Info" - If you have launched a public cloud with managed ClickHouse service, feel free to [open a pull-request](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/cloud.md) adding it to the following list. - -## Yandex Cloud {#yandex-cloud} - -[Yandex Managed Service for ClickHouse](https://cloud.yandex.com/services/managed-clickhouse?utm_source=referrals&utm_medium=clickhouseofficialsite&utm_campaign=link3) provides the following key features: - -- Fully managed ZooKeeper service for [ClickHouse replication](../engines/table-engines/mergetree-family/replication.md) -- Multiple storage type choices -- Replicas in different availability zones -- Encryption and isolation -- Automated maintenance - -## Altinity.Cloud {#altinity.cloud} - -[Altinity.Cloud](https://altinity.com/cloud-database/) is a fully managed ClickHouse-as-a-Service for the Amazon public cloud. - -- Fast deployment of ClickHouse clusters on Amazon resources -- Easy scale-out/scale-in as well as vertical scaling of nodes -- Isolated per-tenant VPCs with public endpoint or VPC peering -- Configurable storage types and volume configurations -- Cross-AZ scaling for performance and high availability -- Built-in monitoring and SQL query editor - -## Alibaba Cloud {#alibaba-cloud} - -[Alibaba Cloud Managed Service for ClickHouse](https://www.alibabacloud.com/product/clickhouse) provides the following key features: - -- Highly reliable cloud disk storage engine based on [Alibaba Cloud Apsara](https://www.alibabacloud.com/product/apsara-stack) distributed system -- Expand capacity on demand without manual data migration -- Support single-node, single-replica, multi-node, and multi-replica architectures, and support hot and cold data tiering -- Support access allow-list, one-key recovery, multi-layer network security protection, cloud disk encryption -- Seamless integration with cloud log systems, databases, and data application tools -- Built-in monitoring and database management platform -- Professional database expert technical support and service - -## SberCloud {#sbercloud} - -[SberCloud.Advanced](https://sbercloud.ru/en/advanced) provides [MapReduce Service (MRS)](https://docs.sbercloud.ru/mrs/ug/topics/ug__clickhouse.html), a reliable, secure, and easy-to-use enterprise-level platform for storing, processing, and analyzing big data. MRS allows you to quickly create and manage ClickHouse clusters. - -- A ClickHouse instance consists of three ZooKeeper nodes and multiple ClickHouse nodes. The Dedicated Replica mode is used to ensure high reliability of dual data copies. -- MRS provides smooth and elastic scaling capabilities to quickly meet service growth requirements in scenarios where the cluster storage capacity or CPU computing resources are not enough. When you expand the capacity of ClickHouse nodes in a cluster, MRS provides a one-click data balancing tool and gives you the initiative to balance data. You can determine the data balancing mode and time based on service characteristics to ensure service availability, implementing smooth scaling. -- MRS uses the Elastic Load Balance ensuring high availability deployment architecture to automatically distribute user access traffic to multiple backend nodes, expanding service capabilities to external systems and improving fault tolerance. With the ELB polling mechanism, data is written to local tables and read from distributed tables on different nodes. In this way, data read/write load and high availability of application access are guaranteed. - -## Tencent Cloud {#tencent-cloud} - -[Tencent Managed Service for ClickHouse](https://cloud.tencent.com/product/cdwch) provides the following key features: - -- Easy to deploy and manage on Tencent Cloud -- Highly scalable and available -- Integrated monitor and alert service -- High security with isolated per cluster VPCs -- On-demand pricing with no upfront costs or long-term commitments - -{## [Original article](https://clickhouse.tech/docs/en/commercial/cloud/) ##} + Detailed public description for ClickHouse cloud services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/en/commercial/index.md b/docs/en/commercial/index.md index 90e74d88ea8..1f1911b8c4d 100644 --- a/docs/en/commercial/index.md +++ b/docs/en/commercial/index.md @@ -6,12 +6,8 @@ toc_title: Introduction # ClickHouse Commercial Services {#clickhouse-commercial-services} -This section is a directory of commercial service providers specializing in ClickHouse. They are independent companies not necessarily affiliated with Yandex. - Service categories: - [Cloud](../commercial/cloud.md) - [Support](../commercial/support.md) -!!! note "For service providers" - If you happen to represent one of them, feel free to open a pull request adding your company to the respective section (or even adding a new section if the service does not fit into existing categories). The easiest way to open a pull-request for documentation page is by using a “pencil” edit button in the top-right corner. If your service available in some local market, make sure to mention it in a localized documentation page as well (or at least point it out in a pull-request description). diff --git a/docs/en/commercial/support.md b/docs/en/commercial/support.md index 27f3f0c6a22..33b69b40b2d 100644 --- a/docs/en/commercial/support.md +++ b/docs/en/commercial/support.md @@ -3,23 +3,7 @@ toc_priority: 3 toc_title: Support --- -# ClickHouse Commercial Support Service Providers {#clickhouse-commercial-support-service-providers} +# ClickHouse Commercial Support Service {#clickhouse-commercial-support-service} !!! info "Info" - If you have launched a ClickHouse commercial support service, feel free to [open a pull-request](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/support.md) adding it to the following list. - -## Yandex.Cloud - -ClickHouse worldwide support from the authors of ClickHouse. Supports on-premise and cloud deployments. Ask details on clickhouse-support@yandex-team.com - -## Altinity {#altinity} - -Altinity has offered enterprise ClickHouse support and services since 2017. Altinity customers range from Fortune 100 enterprises to startups. Visit [www.altinity.com](https://www.altinity.com/) for more information. - -## Mafiree {#mafiree} - -[Service description](http://mafiree.com/clickhouse-analytics-services.php) - -## MinervaDB {#minervadb} - -[Service description](https://minervadb.com/index.php/clickhouse-consulting-and-support-by-minervadb/) + Detailed public description for ClickHouse support services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/en/development/adding_test_queries.md b/docs/en/development/adding_test_queries.md index 4da027b8fb1..a73b0e1ac5d 100644 --- a/docs/en/development/adding_test_queries.md +++ b/docs/en/development/adding_test_queries.md @@ -63,7 +63,7 @@ git checkout -b name_for_a_branch_with_my_test upstream/master #### Install & run clickhouse -1) install `clickhouse-server` (follow [official docs](https://clickhouse.tech/docs/en/getting-started/install/)) +1) install `clickhouse-server` (follow [official docs](https://clickhouse.com/docs/en/getting-started/install/)) 2) install test configurations (it will use Zookeeper mock implementation and adjust some settings) ``` cd ~/workspace/ClickHouse/tests/config diff --git a/docs/en/development/architecture.md b/docs/en/development/architecture.md index e2e40603d30..44e68d645b7 100644 --- a/docs/en/development/architecture.md +++ b/docs/en/development/architecture.md @@ -196,4 +196,4 @@ Besides, each replica stores its state in ZooKeeper as the set of parts and its !!! note "Note" The ClickHouse cluster consists of independent shards, and each shard consists of replicas. The cluster is **not elastic**, so after adding a new shard, data is not rebalanced between shards automatically. Instead, the cluster load is supposed to be adjusted to be uneven. This implementation gives you more control, and it is ok for relatively small clusters, such as tens of nodes. But for clusters with hundreds of nodes that we are using in production, this approach becomes a significant drawback. We should implement a table engine that spans across the cluster with dynamically replicated regions that could be split and balanced between clusters automatically. -{## [Original article](https://clickhouse.tech/docs/en/development/architecture/) ##} +{## [Original article](https://clickhouse.com/docs/en/development/architecture/) ##} diff --git a/docs/en/development/browse-code.md b/docs/en/development/browse-code.md index e65a4d5e549..35555bbd79c 100644 --- a/docs/en/development/browse-code.md +++ b/docs/en/development/browse-code.md @@ -5,7 +5,7 @@ toc_title: Source Code Browser # Browse ClickHouse Source Code {#browse-clickhouse-source-code} -You can use **Woboq** online code browser available [here](https://clickhouse.tech/codebrowser/html_report/ClickHouse/src/index.html). It provides code navigation and semantic highlighting, search and indexing. The code snapshot is updated daily. +You can use **Woboq** online code browser available [here](https://clickhouse.com/codebrowser/html_report/ClickHouse/src/index.html). It provides code navigation and semantic highlighting, search and indexing. The code snapshot is updated daily. Also, you can browse sources on [GitHub](https://github.com/ClickHouse/ClickHouse) as usual. diff --git a/docs/en/development/build-osx.md b/docs/en/development/build-osx.md index 687e0179e07..d188b4bb147 100644 --- a/docs/en/development/build-osx.md +++ b/docs/en/development/build-osx.md @@ -76,7 +76,7 @@ cd ClickHouse rm -rf build mkdir build cd build -cmake -DCMAKE_C_COMPILER=$(brew --prefix gcc)/bin/gcc-10 -DCMAKE_CXX_COMPILER=$(brew --prefix gcc)/bin/g++-10 -DCMAKE_BUILD_TYPE=RelWithDebInfo .. +cmake -DCMAKE_C_COMPILER=$(brew --prefix gcc)/bin/gcc-11 -DCMAKE_CXX_COMPILER=$(brew --prefix gcc)/bin/g++-11 -DCMAKE_BUILD_TYPE=RelWithDebInfo .. cmake --build . --config RelWithDebInfo cd .. ``` @@ -114,15 +114,25 @@ To do so, create the `/Library/LaunchDaemons/limit.maxfiles.plist` file with the ``` -Execute the following command: +Give the file correct permissions: ``` bash sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist ``` -Reboot. +Validate that the file is correct: -To check if it’s working, you can use `ulimit -n` command. +``` bash +plutil /Library/LaunchDaemons/limit.maxfiles.plist +``` + +Load the file (or reboot): + +``` bash +sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist +``` + +To check if it’s working, use the `ulimit -n` or `launchctl limit maxfiles` commands. ## Run ClickHouse server: @@ -131,4 +141,4 @@ cd ClickHouse ./build/programs/clickhouse-server --config-file ./programs/server/config.xml ``` -[Original article](https://clickhouse.tech/docs/en/development/build_osx/) +[Original article](https://clickhouse.com/docs/en/development/build_osx/) diff --git a/docs/en/development/build.md b/docs/en/development/build.md index be45c1ed5f7..633549c68f3 100644 --- a/docs/en/development/build.md +++ b/docs/en/development/build.md @@ -23,7 +23,7 @@ $ sudo apt-get install git cmake python ninja-build Or cmake3 instead of cmake on older systems. -### Install clang-11 (recommended) {#install-clang-11} +### Install clang-13 (recommended) {#install-clang-13} On Ubuntu/Debian you can use the automatic installation script (check [official webpage](https://apt.llvm.org/)) @@ -33,11 +33,11 @@ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" For other Linux distribution - check the availability of the [prebuild packages](https://releases.llvm.org/download.html) or build clang [from sources](https://clang.llvm.org/get_started.html). -#### Use clang-11 for Builds +#### Use clang-13 for Builds ``` bash -$ export CC=clang-11 -$ export CXX=clang++-11 +$ export CC=clang-13 +$ export CXX=clang++-13 ``` Gcc can also be used though it is discouraged. @@ -161,4 +161,4 @@ Note that the split build has several drawbacks: * You cannot run the integration tests since they only work a single complete binary. * You can't easily copy the binaries elsewhere. Instead of moving a single binary you'll need to copy all binaries and libraries. -[Original article](https://clickhouse.tech/docs/en/development/build/) +[Original article](https://clickhouse.com/docs/en/development/build/) diff --git a/docs/en/development/continuous-integration.md b/docs/en/development/continuous-integration.md index 95a7e7bbc69..0176a2dcb76 100644 --- a/docs/en/development/continuous-integration.md +++ b/docs/en/development/continuous-integration.md @@ -117,7 +117,7 @@ described [here](tests.md#functional-test-locally). ## Build Check {#build-check} -Builds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The `cmake` options can be found in the build log, grepping for `cmake`. Use these options and follow the [general build process](build.md). +Builds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The `cmake` options can be found in the build log, grepping for `cmake`. Use these options and follow the [general build process](../development/build.md). ### Report Details @@ -127,7 +127,7 @@ Builds ClickHouse in various configurations for use in further steps. You have t - **Build type**: `Debug` or `RelWithDebInfo` (cmake). - **Sanitizer**: `none` (without sanitizers), `address` (ASan), `memory` (MSan), `undefined` (UBSan), or `thread` (TSan). - **Bundled**: `bundled` build uses libraries from `contrib` folder, and `unbundled` build uses system libraries. -- **Splitted** `splitted` is a [split build](build.md#split-build) +- **Splitted** `splitted` is a [split build](../development/build.md#split-build) - **Status**: `success` or `fail` - **Build log**: link to the building and files copying log, useful when build failed. - **Build time**. @@ -157,7 +157,7 @@ etc. Look at the report to see which tests fail, then reproduce the failure locally as described [here](tests.md#functional-test-locally). Note that you have to use the correct build configuration to reproduce -- a test might fail under AddressSanitizer but pass in Debug. Download the binary from [CI build -checks page](build.md#you-dont-have-to-build-clickhouse), or build it locally. +checks page](../development/build.md#you-dont-have-to-build-clickhouse), or build it locally. ## Functional Stateful Tests @@ -183,11 +183,11 @@ concurrency-related errors. If it fails: ## Split Build Smoke Test -Checks that the server build in [split build](build.md#split-build) +Checks that the server build in [split build](../development/build.md#split-build) configuration can start and run simple queries. If it fails: * Fix other test errors first; - * Build the server in [split build](build.md#split-build) configuration + * Build the server in [split build](../development/build.md#split-build) configuration locally and check whether it can start and run `select 1`. diff --git a/docs/en/development/contrib.md b/docs/en/development/contrib.md index 9daf6148324..a9b9a5d1e44 100644 --- a/docs/en/development/contrib.md +++ b/docs/en/development/contrib.md @@ -5,91 +5,93 @@ toc_title: Third-Party Libraries Used # Third-Party Libraries Used {#third-party-libraries-used} +The list of third-party libraries: + +| Library name | License type | +|:-|:-| +| abseil-cpp | [Apache](https://github.com/ClickHouse-Extras/abseil-cpp/blob/4f3b686f86c3ebaba7e4e926e62a79cb1c659a54/LICENSE) | +| AMQP-CPP | [Apache](https://github.com/ClickHouse-Extras/AMQP-CPP/blob/1a6c51f4ac51ac56610fa95081bd2f349911375a/LICENSE) | +| arrow | [Apache](https://github.com/ClickHouse-Extras/arrow/blob/078e21bad344747b7656ef2d7a4f7410a0a303eb/LICENSE.txt) | +| avro | [Apache](https://github.com/ClickHouse-Extras/avro/blob/e43c46e87fd32eafdc09471e95344555454c5ef8/LICENSE.txt) | +| aws | [Apache](https://github.com/ClickHouse-Extras/aws-sdk-cpp/blob/7d48b2c8193679cc4516e5bd68ae4a64b94dae7d/LICENSE.txt) | +| aws-c-common | [Apache](https://github.com/ClickHouse-Extras/aws-c-common/blob/736a82d1697c108b04a277e66438a7f4e19b6857/LICENSE) | +| aws-c-event-stream | [Apache](https://github.com/ClickHouse-Extras/aws-c-event-stream/blob/3bc33662f9ccff4f4cbcf9509cc78c26e022fde0/LICENSE) | +| aws-checksums | [Apache](https://github.com/ClickHouse-Extras/aws-checksums/blob/519d6d9093819b6cf89ffff589a27ef8f83d0f65/LICENSE) | +| base64 | [BSD 2-clause](https://github.com/ClickHouse-Extras/Turbo-Base64/blob/af9b331f2b4f30b41c70f3a571ff904a8251c1d3/LICENSE) | +| boost | [Boost](https://github.com/ClickHouse-Extras/boost/blob/9cf09dbfd55a5c6202dedbdf40781a51b02c2675/LICENSE_1_0.txt) | +| boringssl | [BSD](https://github.com/ClickHouse-Extras/boringssl/blob/a6a2e2ab3e44d97ce98e51c558e989f211de7eb3/LICENSE) | +| brotli | [MIT](https://github.com/google/brotli/blob/63be8a99401992075c23e99f7c84de1c653e39e2/LICENSE) | +| capnproto | [MIT](https://github.com/capnproto/capnproto/blob/a00ccd91b3746ef2ab51d40fe3265829949d1ace/LICENSE) | +| cassandra | [Apache](https://github.com/ClickHouse-Extras/cpp-driver/blob/eb9b68dadbb4417a2c132ad4a1c2fa76e65e6fc1/LICENSE.txt) | +| cctz | [Apache](https://github.com/ClickHouse-Extras/cctz/blob/c0f1bcb97fd2782f7c3f972fadd5aad5affac4b8/LICENSE.txt) | +| cityhash102 | [MIT](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/cityhash102/COPYING) | +| cppkafka | [BSD 2-clause](https://github.com/mfontanini/cppkafka/blob/5a119f689f8a4d90d10a9635e7ee2bee5c127de1/LICENSE) | +| croaring | [Apache](https://github.com/RoaringBitmap/CRoaring/blob/2c867e9f9c9e2a3a7032791f94c4c7ae3013f6e0/LICENSE) | +| curl | [Apache](https://github.com/curl/curl/blob/3b8bbbbd1609c638a3d3d0acb148a33dedb67be3/docs/LICENSE-MIXING.md) | +| cyrus-sasl | [BSD 2-clause](https://github.com/ClickHouse-Extras/cyrus-sasl/blob/e6466edfd638cc5073debe941c53345b18a09512/COPYING) | +| double-conversion | [BSD 3-clause](https://github.com/google/double-conversion/blob/cf2f0f3d547dc73b4612028a155b80536902ba02/LICENSE) | +| dragonbox | [Apache](https://github.com/ClickHouse-Extras/dragonbox/blob/923705af6fd953aa948fc175f6020b15f7359838/LICENSE-Apache2-LLVM) | +| fast_float | [Apache](https://github.com/fastfloat/fast_float/blob/7eae925b51fd0f570ccd5c880c12e3e27a23b86f/LICENSE) | +| fastops | [MIT](https://github.com/ClickHouse-Extras/fastops/blob/88752a5e03cf34639a4a37a4b41d8b463fffd2b5/LICENSE) | +| flatbuffers | [Apache](https://github.com/ClickHouse-Extras/flatbuffers/blob/eb3f827948241ce0e701516f16cd67324802bce9/LICENSE.txt) | +| fmtlib | [Unknown](https://github.com/fmtlib/fmt/blob/c108ee1d590089ccf642fc85652b845924067af2/LICENSE.rst) | +| gcem | [Apache](https://github.com/kthohr/gcem/blob/8d4f1b5d76ea8f6ff12f3f4f34cda45424556b00/LICENSE) | +| googletest | [BSD 3-clause](https://github.com/google/googletest/blob/e7e591764baba0a0c3c9ad0014430e7a27331d16/LICENSE) | +| grpc | [Apache](https://github.com/ClickHouse-Extras/grpc/blob/60c986e15cae70aade721d26badabab1f822fdd6/LICENSE) | +| h3 | [Apache](https://github.com/ClickHouse-Extras/h3/blob/c7f46cfd71fb60e2fefc90e28abe81657deff735/LICENSE) | +| hyperscan | [Boost](https://github.com/ClickHouse-Extras/hyperscan/blob/e9f08df0213fc637aac0a5bbde9beeaeba2fe9fa/LICENSE) | +| icu | [Public Domain](https://github.com/unicode-org/icu/blob/faa2f9f9e1fe74c5ed00eba371d2830134cdbea1/icu4c/LICENSE) | +| icudata | [Public Domain](https://github.com/ClickHouse-Extras/icudata/blob/f020820388e3faafb44cc643574a2d563dfde572/LICENSE) | +| jemalloc | [BSD 2-clause](https://github.com/ClickHouse-Extras/jemalloc/blob/e6891d9746143bf2cf617493d880ba5a0b9a3efd/COPYING) | +| krb5 | [MIT](https://github.com/ClickHouse-Extras/krb5/blob/5149dea4e2be0f67707383d2682b897c14631374/src/lib/gssapi/LICENSE) | +| libc-headers | [LGPL](https://github.com/ClickHouse-Extras/libc-headers/blob/a720b7105a610acbd7427eea475a5b6810c151eb/LICENSE) | +| libcpuid | [BSD 2-clause](https://github.com/ClickHouse-Extras/libcpuid/blob/8db3b8d2d32d22437f063ce692a1b9bb15e42d18/COPYING) | +| libcxx | [Apache](https://github.com/ClickHouse-Extras/libcxx/blob/2fa892f69acbaa40f8a18c6484854a6183a34482/LICENSE.TXT) | +| libcxxabi | [Apache](https://github.com/ClickHouse-Extras/libcxxabi/blob/df8f1e727dbc9e2bedf2282096fa189dc3fe0076/LICENSE.TXT) | +| libdivide | [zLib](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libdivide/LICENSE.txt) | +| libfarmhash | [MIT](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libfarmhash/COPYING) | +| libgsasl | [LGPL](https://github.com/ClickHouse-Extras/libgsasl/blob/383ee28e82f69fa16ed43b48bd9c8ee5b313ab84/LICENSE) | +| libhdfs3 | [Apache](https://github.com/ClickHouse-Extras/libhdfs3/blob/095b9d48b400abb72d967cb0539af13b1e3d90cf/LICENSE.txt) | +| libmetrohash | [Apache](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libmetrohash/LICENSE) | +| libpq | [Unknown](https://github.com/ClickHouse-Extras/libpq/blob/e071ea570f8985aa00e34f5b9d50a3cfe666327e/COPYRIGHT) | +| libpqxx | [BSD 3-clause](https://github.com/ClickHouse-Extras/libpqxx/blob/357608d11b7a1961c3fb7db2ef9a5dbb2e87da77/COPYING) | +| librdkafka | [MIT](https://github.com/ClickHouse-Extras/librdkafka/blob/b8554f1682062c85ba519eb54ef2f90e02b812cb/LICENSE.murmur2) | +| libunwind | [Apache](https://github.com/ClickHouse-Extras/libunwind/blob/6b816d2fba3991f8fd6aaec17d92f68947eab667/LICENSE.TXT) | +| libuv | [BSD](https://github.com/ClickHouse-Extras/libuv/blob/e2e9b7e9f978ce8a1367b5fe781d97d1ce9f94ab/LICENSE) | +| llvm | [Apache](https://github.com/ClickHouse-Extras/llvm/blob/e5751459412bce1391fb7a2e9bbc01e131bf72f1/llvm/LICENSE.TXT) | +| lz4 | [BSD](https://github.com/lz4/lz4/blob/f39b79fb02962a1cd880bbdecb6dffba4f754a11/LICENSE) | +| mariadb-connector-c | [LGPL](https://github.com/ClickHouse-Extras/mariadb-connector-c/blob/5f4034a3a6376416504f17186c55fe401c6d8e5e/COPYING.LIB) | +| miniselect | [Boost](https://github.com/danlark1/miniselect/blob/be0af6bd0b6eb044d1acc4f754b229972d99903a/LICENSE_1_0.txt) | +| msgpack-c | [Boost](https://github.com/msgpack/msgpack-c/blob/46684265d50b5d1b062d4c5c428ba08462844b1d/LICENSE_1_0.txt) | +| murmurhash | [Public Domain](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/murmurhash/LICENSE) | +| NuRaft | [Apache](https://github.com/ClickHouse-Extras/NuRaft/blob/7ecb16844af6a9c283ad432d85ecc2e7d1544676/LICENSE) | +| openldap | [Unknown](https://github.com/ClickHouse-Extras/openldap/blob/0208811b6043ca06fda8631a5e473df1ec515ccb/LICENSE) | +| orc | [Apache](https://github.com/ClickHouse-Extras/orc/blob/0a936f6bbdb9303308973073f8623b5a8d82eae1/LICENSE) | +| poco | [Boost](https://github.com/ClickHouse-Extras/poco/blob/7351c4691b5d401f59e3959adfc5b4fa263b32da/LICENSE) | +| protobuf | [BSD 3-clause](https://github.com/ClickHouse-Extras/protobuf/blob/75601841d172c73ae6bf4ce8121f42b875cdbabd/LICENSE) | +| rapidjson | [MIT](https://github.com/ClickHouse-Extras/rapidjson/blob/c4ef90ccdbc21d5d5a628d08316bfd301e32d6fa/bin/jsonschema/LICENSE) | +| re2 | [BSD 3-clause](https://github.com/google/re2/blob/13ebb377c6ad763ca61d12dd6f88b1126bd0b911/LICENSE) | +| replxx | [BSD 3-clause](https://github.com/ClickHouse-Extras/replxx/blob/c81be6c68b146f15f2096b7ef80e3f21fe27004c/LICENSE.md) | +| rocksdb | [BSD 3-clause](https://github.com/ClickHouse-Extras/rocksdb/blob/b6480c69bf3ab6e298e0d019a07fd4f69029b26a/LICENSE.leveldb) | +| s2geometry | [Apache](https://github.com/ClickHouse-Extras/s2geometry/blob/20ea540d81f4575a3fc0aea585aac611bcd03ede/LICENSE) | +| sentry-native | [MIT](https://github.com/ClickHouse-Extras/sentry-native/blob/94644e92f0a3ff14bd35ed902a8622a2d15f7be4/LICENSE) | +| simdjson | [Apache](https://github.com/simdjson/simdjson/blob/8df32cea3359cb30120795da6020b3b73da01d38/LICENSE) | +| snappy | [Public Domain](https://github.com/google/snappy/blob/3f194acb57e0487531c96b97af61dcbd025a78a3/COPYING) | +| sparsehash-c11 | [BSD 3-clause](https://github.com/sparsehash/sparsehash-c11/blob/cf0bffaa456f23bc4174462a789b90f8b6f5f42f/LICENSE) | +| stats | [Apache](https://github.com/kthohr/stats/blob/b6dd459c10a88c7ea04693c007e9e35820c5d9ad/LICENSE) | +| thrift | [Apache](https://github.com/apache/thrift/blob/010ccf0a0c7023fea0f6bf4e4078ebdff7e61982/LICENSE) | +| unixodbc | [LGPL](https://github.com/ClickHouse-Extras/UnixODBC/blob/b0ad30f7f6289c12b76f04bfb9d466374bb32168/COPYING) | +| xz | [Public Domain](https://github.com/xz-mirror/xz/blob/869b9d1b4edd6df07f819d360d306251f8147353/COPYING) | +| zlib-ng | [zLib](https://github.com/ClickHouse-Extras/zlib-ng/blob/6a5e93b9007782115f7f7e5235dedc81c4f1facb/LICENSE.md) | +| zstd | [BSD](https://github.com/facebook/zstd/blob/a488ba114ec17ea1054b9057c26a046fc122b3b6/LICENSE) | + The list of third-party libraries can be obtained by the following query: ``` sql SELECT library_name, license_type, license_path FROM system.licenses ORDER BY library_name COLLATE 'en'; ``` -[Example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIGxpYnJhcnlfbmFtZSwgbGljZW5zZV90eXBlLCBsaWNlbnNlX3BhdGggRlJPTSBzeXN0ZW0ubGljZW5zZXMgT1JERVIgQlkgbGlicmFyeV9uYW1lIENPTExBVEUgJ2VuJw==) - -| library_name | license_type | license_path | -|:-|:-|:-| -| abseil-cpp | Apache | /contrib/abseil-cpp/LICENSE | -| AMQP-CPP | Apache | /contrib/AMQP-CPP/LICENSE | -| arrow | Apache | /contrib/arrow/LICENSE.txt | -| avro | Apache | /contrib/avro/LICENSE.txt | -| aws | Apache | /contrib/aws/LICENSE.txt | -| aws-c-common | Apache | /contrib/aws-c-common/LICENSE | -| aws-c-event-stream | Apache | /contrib/aws-c-event-stream/LICENSE | -| aws-checksums | Apache | /contrib/aws-checksums/LICENSE | -| base64 | BSD 2-clause | /contrib/base64/LICENSE | -| boost | Boost | /contrib/boost/LICENSE_1_0.txt | -| boringssl | BSD | /contrib/boringssl/LICENSE | -| brotli | MIT | /contrib/brotli/LICENSE | -| capnproto | MIT | /contrib/capnproto/LICENSE | -| cassandra | Apache | /contrib/cassandra/LICENSE.txt | -| cctz | Apache | /contrib/cctz/LICENSE.txt | -| cityhash102 | MIT | /contrib/cityhash102/COPYING | -| cppkafka | BSD 2-clause | /contrib/cppkafka/LICENSE | -| croaring | Apache | /contrib/croaring/LICENSE | -| curl | Apache | /contrib/curl/docs/LICENSE-MIXING.md | -| cyrus-sasl | BSD 2-clause | /contrib/cyrus-sasl/COPYING | -| double-conversion | BSD 3-clause | /contrib/double-conversion/LICENSE | -| dragonbox | Apache | /contrib/dragonbox/LICENSE-Apache2-LLVM | -| fast_float | Apache | /contrib/fast_float/LICENSE | -| fastops | MIT | /contrib/fastops/LICENSE | -| flatbuffers | Apache | /contrib/flatbuffers/LICENSE.txt | -| fmtlib | Unknown | /contrib/fmtlib/LICENSE.rst | -| gcem | Apache | /contrib/gcem/LICENSE | -| googletest | BSD 3-clause | /contrib/googletest/LICENSE | -| grpc | Apache | /contrib/grpc/LICENSE | -| h3 | Apache | /contrib/h3/LICENSE | -| hyperscan | Boost | /contrib/hyperscan/LICENSE | -| icu | Public Domain | /contrib/icu/icu4c/LICENSE | -| icudata | Public Domain | /contrib/icudata/LICENSE | -| jemalloc | BSD 2-clause | /contrib/jemalloc/COPYING | -| krb5 | MIT | /contrib/krb5/src/lib/gssapi/LICENSE | -| libc-headers | LGPL | /contrib/libc-headers/LICENSE | -| libcpuid | BSD 2-clause | /contrib/libcpuid/COPYING | -| libcxx | Apache | /contrib/libcxx/LICENSE.TXT | -| libcxxabi | Apache | /contrib/libcxxabi/LICENSE.TXT | -| libdivide | zLib | /contrib/libdivide/LICENSE.txt | -| libfarmhash | MIT | /contrib/libfarmhash/COPYING | -| libgsasl | LGPL | /contrib/libgsasl/LICENSE | -| libhdfs3 | Apache | /contrib/libhdfs3/LICENSE.txt | -| libmetrohash | Apache | /contrib/libmetrohash/LICENSE | -| libpq | Unknown | /contrib/libpq/COPYRIGHT | -| libpqxx | BSD 3-clause | /contrib/libpqxx/COPYING | -| librdkafka | MIT | /contrib/librdkafka/LICENSE.murmur2 | -| libunwind | Apache | /contrib/libunwind/LICENSE.TXT | -| libuv | BSD | /contrib/libuv/LICENSE | -| llvm | Apache | /contrib/llvm/llvm/LICENSE.TXT | -| lz4 | BSD | /contrib/lz4/LICENSE | -| mariadb-connector-c | LGPL | /contrib/mariadb-connector-c/COPYING.LIB | -| miniselect | Boost | /contrib/miniselect/LICENSE_1_0.txt | -| msgpack-c | Boost | /contrib/msgpack-c/LICENSE_1_0.txt | -| murmurhash | Public Domain | /contrib/murmurhash/LICENSE | -| NuRaft | Apache | /contrib/NuRaft/LICENSE | -| openldap | Unknown | /contrib/openldap/LICENSE | -| orc | Apache | /contrib/orc/LICENSE | -| poco | Boost | /contrib/poco/LICENSE | -| protobuf | BSD 3-clause | /contrib/protobuf/LICENSE | -| rapidjson | MIT | /contrib/rapidjson/bin/jsonschema/LICENSE | -| re2 | BSD 3-clause | /contrib/re2/LICENSE | -| replxx | BSD 3-clause | /contrib/replxx/LICENSE.md | -| rocksdb | BSD 3-clause | /contrib/rocksdb/LICENSE.leveldb | -| s2geometry | Apache | /contrib/s2geometry/LICENSE | -| sentry-native | MIT | /contrib/sentry-native/LICENSE | -| simdjson | Apache | /contrib/simdjson/LICENSE | -| snappy | Public Domain | /contrib/snappy/COPYING | -| sparsehash-c11 | BSD 3-clause | /contrib/sparsehash-c11/LICENSE | -| stats | Apache | /contrib/stats/LICENSE | -| thrift | Apache | /contrib/thrift/LICENSE | -| unixodbc | LGPL | /contrib/unixodbc/COPYING | -| xz | Public Domain | /contrib/xz/COPYING | -| zlib-ng | zLib | /contrib/zlib-ng/LICENSE.md | -| zstd | BSD | /contrib/zstd/LICENSE | +[Example](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIGxpYnJhcnlfbmFtZSwgbGljZW5zZV90eXBlLCBsaWNlbnNlX3BhdGggRlJPTSBzeXN0ZW0ubGljZW5zZXMgT1JERVIgQlkgbGlicmFyeV9uYW1lIENPTExBVEUgJ2VuJw==) ## Guidelines for adding new third-party libraries and maintaining custom changes in them {#adding-third-party-libraries} diff --git a/docs/en/development/developer-instruction.md b/docs/en/development/developer-instruction.md index 537ed6a9c4f..be6a08d397c 100644 --- a/docs/en/development/developer-instruction.md +++ b/docs/en/development/developer-instruction.md @@ -233,13 +233,13 @@ Just in case, it is worth mentioning that CLion creates `build` path on its own, ## Writing Code {#writing-code} -The description of ClickHouse architecture can be found here: https://clickhouse.tech/docs/en/development/architecture/ +The description of ClickHouse architecture can be found here: https://clickhouse.com/docs/en/development/architecture/ -The Code Style Guide: https://clickhouse.tech/docs/en/development/style/ +The Code Style Guide: https://clickhouse.com/docs/en/development/style/ -Adding third-party libraries: https://clickhouse.tech/docs/en/development/contrib/#adding-third-party-libraries +Adding third-party libraries: https://clickhouse.com/docs/en/development/contrib/#adding-third-party-libraries -Writing tests: https://clickhouse.tech/docs/en/development/tests/ +Writing tests: https://clickhouse.com/docs/en/development/tests/ List of tasks: https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+task%22 @@ -249,8 +249,8 @@ Developing ClickHouse often requires loading realistic datasets. It is particula sudo apt install wget xz-utils - wget https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz - wget https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz + wget https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz + wget https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz xz -v -d hits_v1.tsv.xz xz -v -d visits_v1.tsv.xz diff --git a/docs/en/development/index.md b/docs/en/development/index.md index bb4158554d3..f9f0d644973 100644 --- a/docs/en/development/index.md +++ b/docs/en/development/index.md @@ -7,4 +7,4 @@ toc_title: hidden # ClickHouse Development {#clickhouse-development} -[Original article](https://clickhouse.tech/docs/en/development/) +[Original article](https://clickhouse.com/docs/en/development/) diff --git a/docs/en/development/style.md b/docs/en/development/style.md index 987df275c1d..bc38f0711cf 100644 --- a/docs/en/development/style.md +++ b/docs/en/development/style.md @@ -828,4 +828,4 @@ function( size_t limit) ``` -[Original article](https://clickhouse.tech/docs/en/development/style/) +[Original article](https://clickhouse.com/docs/en/development/style/) diff --git a/docs/en/development/tests.md b/docs/en/development/tests.md index c7c0ec88be4..0e2aa348483 100644 --- a/docs/en/development/tests.md +++ b/docs/en/development/tests.md @@ -239,7 +239,7 @@ Google OSS-Fuzz can be found at `docker/fuzz`. We also use simple fuzz test to generate random SQL queries and to check that the server does not die executing them. You can find it in `00746_sql_fuzzy.pl`. This test should be run continuously (overnight and longer). -We also use sophisticated AST-based query fuzzer that is able to find huge amount of corner cases. It does random permutations and substitutions in queries AST. It remembers AST nodes from previous tests to use them for fuzzing of subsequent tests while processing them in random order. You can learn more about this fuzzer in [this blog article](https://clickhouse.tech/blog/en/2021/fuzzing-clickhouse/). +We also use sophisticated AST-based query fuzzer that is able to find huge amount of corner cases. It does random permutations and substitutions in queries AST. It remembers AST nodes from previous tests to use them for fuzzing of subsequent tests while processing them in random order. You can learn more about this fuzzer in [this blog article](https://clickhouse.com/blog/en/2021/fuzzing-clickhouse/). ## Stress test @@ -341,4 +341,4 @@ Build jobs and tests are run in Sandbox on per commit basis. Resulting packages We do not use Travis CI due to the limit on time and computational power. We do not use Jenkins. It was used before and now we are happy we are not using Jenkins. -[Original article](https://clickhouse.tech/docs/en/development/tests/) +[Original article](https://clickhouse.com/docs/en/development/tests/) diff --git a/docs/en/engines/database-engines/index.md b/docs/en/engines/database-engines/index.md index 1d1028cbeb5..dd8959d2700 100644 --- a/docs/en/engines/database-engines/index.md +++ b/docs/en/engines/database-engines/index.md @@ -23,3 +23,5 @@ You can also use the following database engines: - [PostgreSQL](../../engines/database-engines/postgresql.md) - [Replicated](../../engines/database-engines/replicated.md) + +- [SQLite](../../engines/database-engines/sqlite.md) diff --git a/docs/en/engines/database-engines/lazy.md b/docs/en/engines/database-engines/lazy.md index c59abec0ba5..ecd4b94f579 100644 --- a/docs/en/engines/database-engines/lazy.md +++ b/docs/en/engines/database-engines/lazy.md @@ -13,4 +13,4 @@ It’s optimized for storing many small \*Log tables, for which there is a long CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds); -[Original article](https://clickhouse.tech/docs/en/database_engines/lazy/) +[Original article](https://clickhouse.com/docs/en/database_engines/lazy/) diff --git a/docs/en/engines/database-engines/materialized-mysql.md b/docs/en/engines/database-engines/materialized-mysql.md index d329dff32c5..5aa969daf88 100644 --- a/docs/en/engines/database-engines/materialized-mysql.md +++ b/docs/en/engines/database-engines/materialized-mysql.md @@ -1,6 +1,6 @@ --- toc_priority: 29 -toc_title: "[experimental] MaterializedMySQL" +toc_title: MaterializedMySQL --- # [experimental] MaterializedMySQL {#materialized-mysql} @@ -197,4 +197,4 @@ SELECT * FROM mysql.test; └───┴─────┴──────┘ ``` -[Original article](https://clickhouse.tech/docs/en/engines/database-engines/materialized-mysql/) +[Original article](https://clickhouse.com/docs/en/engines/database-engines/materialized-mysql/) diff --git a/docs/en/engines/database-engines/materialized-postgresql.md b/docs/en/engines/database-engines/materialized-postgresql.md index 89c7c803bb3..e759ba2f416 100644 --- a/docs/en/engines/database-engines/materialized-postgresql.md +++ b/docs/en/engines/database-engines/materialized-postgresql.md @@ -23,6 +23,20 @@ ENGINE = MaterializedPostgreSQL('host:port', ['database' | database], 'user', 'p - `user` — PostgreSQL user. - `password` — User password. +## Dynamically adding new tables to replication + +``` sql +ATTACH TABLE postgres_database.new_table; +``` + +It will work as well if there is a setting `materialized_postgresql_tables_list`. + +## Dynamically removing tables from replication + +``` sql +DETACH TABLE postgres_database.table_to_remove; +``` + ## Settings {#settings} - [materialized_postgresql_max_block_size](../../operations/settings/settings.md#materialized-postgresql-max-block-size) @@ -31,6 +45,10 @@ ENGINE = MaterializedPostgreSQL('host:port', ['database' | database], 'user', 'p - [materialized_postgresql_allow_automatic_update](../../operations/settings/settings.md#materialized-postgresql-allow-automatic-update) +- [materialized_postgresql_replication_slot](../../operations/settings/settings.md#materialized-postgresql-replication-slot) + +- [materialized_postgresql_snapshot](../../operations/settings/settings.md#materialized-postgresql-snapshot) + ``` sql CREATE DATABASE database1 ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') @@ -40,6 +58,12 @@ SETTINGS materialized_postgresql_max_block_size = 65536, SELECT * FROM database1.table1; ``` +It is also possible to change settings at run time. + +``` sql +ALTER DATABASE postgres_database MODIFY SETTING materialized_postgresql_max_block_size = ; +``` + ## Requirements {#requirements} 1. The [wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html) setting must have a value `logical` and `max_replication_slots` parameter must have a value at least `2` in the PostgreSQL config file. @@ -73,7 +97,7 @@ WHERE oid = 'postgres_table'::regclass; !!! warning "Warning" Replication of [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html) values is not supported. The default value for the data type will be used. - + ## Example of Use {#example-of-use} ``` sql @@ -82,3 +106,11 @@ ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres SELECT * FROM postgresql_db.postgres_table; ``` + +## Notes {#notes} + +- Failover of the logical replication slot. + +Logical Replication Slots which exist on the primary are not available on standby replicas. +So if there is a failover, new primary (the old physical standby) won’t be aware of any slots which were existing with old primary. This will lead to a broken replication from PostgreSQL. +A solution to this is to manage replication slots yourself and define a permanent replication slot (some information can be found [here](https://patroni.readthedocs.io/en/latest/SETTINGS.html)). You'll need to pass slot name via `materialized_postgresql_replication_slot` setting, and it has to be exported with `EXPORT SNAPSHOT` option. The snapshot identifier needs to be passed via `materialized_postgresql_snapshot` setting. diff --git a/docs/en/engines/database-engines/mysql.md b/docs/en/engines/database-engines/mysql.md index 0507be6bd46..c5a1bba44b2 100644 --- a/docs/en/engines/database-engines/mysql.md +++ b/docs/en/engines/database-engines/mysql.md @@ -147,4 +147,4 @@ SELECT * FROM mysql_db.mysql_table └────────┴───────┘ ``` -[Original article](https://clickhouse.tech/docs/en/database_engines/mysql/) +[Original article](https://clickhouse.com/docs/en/database_engines/mysql/) diff --git a/docs/en/engines/database-engines/postgresql.md b/docs/en/engines/database-engines/postgresql.md index 9e339f9d6f4..76ef484e773 100644 --- a/docs/en/engines/database-engines/postgresql.md +++ b/docs/en/engines/database-engines/postgresql.md @@ -136,4 +136,4 @@ DESCRIBE TABLE test_database.test_table; └────────┴───────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/database-engines/postgresql/) +[Original article](https://clickhouse.com/docs/en/database-engines/postgresql/) diff --git a/docs/en/engines/database-engines/sqlite.md b/docs/en/engines/database-engines/sqlite.md new file mode 100644 index 00000000000..ee9db90859f --- /dev/null +++ b/docs/en/engines/database-engines/sqlite.md @@ -0,0 +1,80 @@ +--- +toc_priority: 32 +toc_title: SQLite +--- + +# SQLite {#sqlite} + +Allows to connect to [SQLite](https://www.sqlite.org/index.html) database and perform `INSERT` and `SELECT` queries to exchange data between ClickHouse and SQLite. + +## Creating a Database {#creating-a-database} + +``` sql + CREATE DATABASE sqlite_database + ENGINE = SQLite('db_path') +``` + +**Engine Parameters** + +- `db_path` — Path to a file with SQLite database. + +## Data Types Support {#data_types-support} + +| SQLite | ClickHouse | +|---------------|---------------------------------------------------------| +| INTEGER | [Int32](../../sql-reference/data-types/int-uint.md) | +| REAL | [Float32](../../sql-reference/data-types/float.md) | +| TEXT | [String](../../sql-reference/data-types/string.md) | +| BLOB | [String](../../sql-reference/data-types/string.md) | + +## Specifics and Recommendations {#specifics-and-recommendations} + +SQLite stores the entire database (definitions, tables, indices, and the data itself) as a single cross-platform file on a host machine. During writing SQLite locks the entire database file, therefore write operations are performed sequentially. Read operations can be multitasked. +SQLite does not require service management (such as startup scripts) or access control based on `GRANT` and passwords. Access control is handled by means of file-system permissions given to the database file itself. + +## Usage Example {#usage-example} + +Database in ClickHouse, connected to the SQLite: + +``` sql +CREATE DATABASE sqlite_db ENGINE = SQLite('sqlite.db'); +SHOW TABLES FROM sqlite_db; +``` + +``` text +┌──name───┐ +│ table1 │ +│ table2 │ +└─────────┘ +``` + +Shows the tables: + +``` sql +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` +Inserting data into SQLite table from ClickHouse table: + +``` sql +CREATE TABLE clickhouse_table(`col1` String,`col2` Int16) ENGINE = MergeTree() ORDER BY col2; +INSERT INTO clickhouse_table VALUES ('text',10); +INSERT INTO sqlite_db.table1 SELECT * FROM clickhouse_table; +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +│ text │ 10 │ +└───────┴──────┘ +``` diff --git a/docs/en/engines/index.md b/docs/en/engines/index.md index 6b2b6509e8b..b3f4a4f7b69 100644 --- a/docs/en/engines/index.md +++ b/docs/en/engines/index.md @@ -12,4 +12,4 @@ There are two key engine kinds in ClickHouse: - [Table engines](../engines/table-engines/index.md) - [Database engines](../engines/database-engines/index.md) -{## [Original article](https://clickhouse.tech/docs/en/engines/) ##} +{## [Original article](https://clickhouse.com/docs/en/engines/) ##} diff --git a/docs/en/engines/table-engines/index.md b/docs/en/engines/table-engines/index.md index 13b3395e15b..09e0147bbf7 100644 --- a/docs/en/engines/table-engines/index.md +++ b/docs/en/engines/table-engines/index.md @@ -86,4 +86,4 @@ To select data from a virtual column, you must specify its name in the `SELECT` If you create a table with a column that has the same name as one of the table virtual columns, the virtual column becomes inaccessible. We do not recommend doing this. To help avoid conflicts, virtual column names are usually prefixed with an underscore. -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/) diff --git a/docs/en/engines/table-engines/integrations/embedded-rocksdb.md b/docs/en/engines/table-engines/integrations/embedded-rocksdb.md index b55f1b68aea..7b9f8b8c400 100644 --- a/docs/en/engines/table-engines/integrations/embedded-rocksdb.md +++ b/docs/en/engines/table-engines/integrations/embedded-rocksdb.md @@ -81,4 +81,4 @@ You can also change any [rocksdb options](https://github.com/facebook/rocksdb/wi ``` -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/embedded-rocksdb/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/embedded-rocksdb/) diff --git a/docs/en/engines/table-engines/integrations/hdfs.md b/docs/en/engines/table-engines/integrations/hdfs.md index 677354b4f97..0fcf7a63dd8 100644 --- a/docs/en/engines/table-engines/integrations/hdfs.md +++ b/docs/en/engines/table-engines/integrations/hdfs.md @@ -184,9 +184,10 @@ Similar to GraphiteMergeTree, the HDFS engine supports extended configuration us |hadoop\_kerberos\_keytab | "" | |hadoop\_kerberos\_principal | "" | |hadoop\_kerberos\_kinit\_command | kinit | +|libhdfs3\_conf | "" | ### Limitations {#limitations} - * hadoop\_security\_kerberos\_ticket\_cache\_path can be global only, not user specific + * hadoop\_security\_kerberos\_ticket\_cache\_path and libhdfs3\_conf can be global only, not user specific ## Kerberos support {#kerberos-support} @@ -198,6 +199,22 @@ security approach). Use tests/integration/test\_storage\_kerberized\_hdfs/hdfs_c If hadoop\_kerberos\_keytab, hadoop\_kerberos\_principal or hadoop\_kerberos\_kinit\_command is specified, kinit will be invoked. hadoop\_kerberos\_keytab and hadoop\_kerberos\_principal are mandatory in this case. kinit tool and krb5 configuration files are required. +## HDFS Namenode HA support{#namenode-ha} + +libhdfs3 support HDFS namenode HA. + +- Copy `hdfs-site.xml` from an HDFS node to `/etc/clickhouse-server/`. +- Add following piece to ClickHouse config file: + +``` xml + + /etc/clickhouse-server/hdfs-site.xml + +``` + +- Then use `dfs.nameservices` tag value of `hdfs-site.xml` as the namenode address in the HDFS URI. For example, replace `hdfs://appadmin@192.168.101.11:8020/abc/` with `hdfs://appadmin@my_nameservice/abc/`. + + ## Virtual Columns {#virtual-columns} - `_path` — Path to the file. @@ -207,4 +224,4 @@ If hadoop\_kerberos\_keytab, hadoop\_kerberos\_principal or hadoop\_kerberos\_ki - [Virtual columns](../../../engines/table-engines/index.md#table_engines-virtual_columns) -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/hdfs/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/hdfs/) diff --git a/docs/en/engines/table-engines/integrations/index.md b/docs/en/engines/table-engines/integrations/index.md index eb1c5411e18..743d25ad616 100644 --- a/docs/en/engines/table-engines/integrations/index.md +++ b/docs/en/engines/table-engines/integrations/index.md @@ -19,3 +19,4 @@ List of supported integrations: - [EmbeddedRocksDB](../../../engines/table-engines/integrations/embedded-rocksdb.md) - [RabbitMQ](../../../engines/table-engines/integrations/rabbitmq.md) - [PostgreSQL](../../../engines/table-engines/integrations/postgresql.md) +- [SQLite](../../../engines/table-engines/integrations/sqlite.md) diff --git a/docs/en/engines/table-engines/integrations/jdbc.md b/docs/en/engines/table-engines/integrations/jdbc.md index e43e782a420..2f442fd7753 100644 --- a/docs/en/engines/table-engines/integrations/jdbc.md +++ b/docs/en/engines/table-engines/integrations/jdbc.md @@ -92,4 +92,4 @@ FROM system.numbers - [JDBC table function](../../../sql-reference/table-functions/jdbc.md). -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/jdbc/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/jdbc/) diff --git a/docs/en/engines/table-engines/integrations/kafka.md b/docs/en/engines/table-engines/integrations/kafka.md index a3a13f9d152..879e919e823 100644 --- a/docs/en/engines/table-engines/integrations/kafka.md +++ b/docs/en/engines/table-engines/integrations/kafka.md @@ -194,4 +194,4 @@ Example: - [Virtual columns](../../../engines/table-engines/index.md#table_engines-virtual_columns) - [background_schedule_pool_size](../../../operations/settings/settings.md#background_schedule_pool_size) -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/kafka/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/kafka/) diff --git a/docs/en/engines/table-engines/integrations/mongodb.md b/docs/en/engines/table-engines/integrations/mongodb.md index 9839893d4e8..b8a9bb19a05 100644 --- a/docs/en/engines/table-engines/integrations/mongodb.md +++ b/docs/en/engines/table-engines/integrations/mongodb.md @@ -66,4 +66,4 @@ SELECT COUNT() FROM mongo_table; └─────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/mongodb/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/mongodb/) diff --git a/docs/en/engines/table-engines/integrations/mysql.md b/docs/en/engines/table-engines/integrations/mysql.md index a6402e00bc9..b0e5959c0c2 100644 --- a/docs/en/engines/table-engines/integrations/mysql.md +++ b/docs/en/engines/table-engines/integrations/mysql.md @@ -19,6 +19,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] SETTINGS [connection_pool_size=16, ] [connection_max_tries=3, ] + [connection_wait_timeout=5, ] /* 0 -- do not wait */ [connection_auto_close=true ] ; ``` @@ -112,4 +113,4 @@ SELECT * FROM mysql_table - [The ‘mysql’ table function](../../../sql-reference/table-functions/mysql.md) - [Using MySQL as a source of external dictionary](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-mysql) -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/mysql/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/mysql/) diff --git a/docs/en/engines/table-engines/integrations/odbc.md b/docs/en/engines/table-engines/integrations/odbc.md index ab39fb7a811..0ef21d8565a 100644 --- a/docs/en/engines/table-engines/integrations/odbc.md +++ b/docs/en/engines/table-engines/integrations/odbc.md @@ -128,4 +128,4 @@ SELECT * FROM odbc_t - [ODBC external dictionaries](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-odbc) - [ODBC table function](../../../sql-reference/table-functions/odbc.md) -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/odbc/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/odbc/) diff --git a/docs/en/engines/table-engines/integrations/postgresql.md b/docs/en/engines/table-engines/integrations/postgresql.md index 4c763153a36..0bdb54e0c16 100644 --- a/docs/en/engines/table-engines/integrations/postgresql.md +++ b/docs/en/engines/table-engines/integrations/postgresql.md @@ -34,6 +34,7 @@ The table structure can differ from the original PostgreSQL table structure: - `user` — PostgreSQL user. - `password` — User password. - `schema` — Non-default table schema. Optional. +- `on conflict ...` — example: `ON CONFLICT DO NOTHING`. Optional. Note: adding this option will make insertion less efficient. ## Implementation Details {#implementation-details} @@ -148,4 +149,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [The `postgresql` table function](../../../sql-reference/table-functions/postgresql.md) - [Using PostgreSQL as a source of external dictionary](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-postgresql) -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/postgresql/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/postgresql/) diff --git a/docs/en/engines/table-engines/integrations/rabbitmq.md b/docs/en/engines/table-engines/integrations/rabbitmq.md index 5fb9ce5b151..ebb42461204 100644 --- a/docs/en/engines/table-engines/integrations/rabbitmq.md +++ b/docs/en/engines/table-engines/integrations/rabbitmq.md @@ -21,11 +21,12 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] name2 [type2] [DEFAULT|MATERIALIZED|ALIAS expr2], ... ) ENGINE = RabbitMQ SETTINGS - rabbitmq_host_port = 'host:port', + rabbitmq_host_port = 'host:port' [or rabbitmq_address = 'amqp(s)://guest:guest@localhost/vhost'], rabbitmq_exchange_name = 'exchange_name', rabbitmq_format = 'data_format'[,] [rabbitmq_exchange_type = 'exchange_type',] [rabbitmq_routing_key_list = 'key1,key2,...',] + [rabbitmq_secure = 0,] [rabbitmq_row_delimiter = 'delimiter_symbol',] [rabbitmq_schema = '',] [rabbitmq_num_consumers = N,] @@ -59,6 +60,11 @@ Optional parameters: - `rabbitmq_max_block_size` - `rabbitmq_flush_interval_ms` +SSL connection: + +Use either `rabbitmq_secure = 1` or `amqps` in connection address: `rabbitmq_address = 'amqps://guest:guest@localhost/vhost'`. +The default behaviour of the used library is not to check if the created TLS connection is sufficiently secure. Whether the certificate is expired, self-signed, missing or invalid: the connection is simply permitted. More strict checking of certificates can possibly be implemented in the future. + Also format settings can be added along with rabbitmq-related settings. Example: @@ -164,4 +170,4 @@ Example: - `_message_id` - messageID of the received message; non-empty if was set, when message was published. - `_timestamp` - timestamp of the received message; non-empty if was set, when message was published. -[Original article](https://clickhouse.tech/docs/en/engines/table-engines/integrations/rabbitmq/) +[Original article](https://clickhouse.com/docs/en/engines/table-engines/integrations/rabbitmq/) diff --git a/docs/en/engines/table-engines/integrations/s3.md b/docs/en/engines/table-engines/integrations/s3.md index 7249e24aff9..e494e9aec6a 100644 --- a/docs/en/engines/table-engines/integrations/s3.md +++ b/docs/en/engines/table-engines/integrations/s3.md @@ -210,4 +210,4 @@ ENGINE = S3('https://storage.yandexcloud.net/my-test-bucket-768/big_prefix/file- ## See also -- [S3 table function](../../../sql-reference/table-functions/s3.md) +- [s3 table function](../../../sql-reference/table-functions/s3.md) diff --git a/docs/en/engines/table-engines/integrations/sqlite.md b/docs/en/engines/table-engines/integrations/sqlite.md new file mode 100644 index 00000000000..391f1696291 --- /dev/null +++ b/docs/en/engines/table-engines/integrations/sqlite.md @@ -0,0 +1,59 @@ +--- +toc_priority: 7 +toc_title: SQLite +--- + +# SQLite {#sqlite} + +The engine allows to import and export data to SQLite and supports queries to SQLite tables directly from ClickHouse. + +## Creating a Table {#creating-a-table} + +``` sql + CREATE TABLE [IF NOT EXISTS] [db.]table_name + ( + name1 [type1], + name2 [type2], ... + ) ENGINE = SQLite('db_path', 'table') +``` + +**Engine Parameters** + +- `db_path` — Path to SQLite file with a database. +- `table` — Name of a table in the SQLite database. + +## Usage Example {#usage-example} + +Shows a query creating the SQLite table: + +```sql +SHOW CREATE TABLE sqlite_db.table2; +``` + +``` text +CREATE TABLE SQLite.table2 +( + `col1` Nullable(Int32), + `col2` Nullable(String) +) +ENGINE = SQLite('sqlite.db','table2'); +``` + +Returns the data from the table: + +``` sql +SELECT * FROM sqlite_db.table2 ORDER BY col1; +``` + +```text +┌─col1─┬─col2──┐ +│ 1 │ text1 │ +│ 2 │ text2 │ +│ 3 │ text3 │ +└──────┴───────┘ +``` + +**See Also** + +- [SQLite](../../../engines/database-engines/sqlite.md) engine +- [sqlite](../../../sql-reference/table-functions/sqlite.md) table function \ No newline at end of file diff --git a/docs/en/engines/table-engines/log-family/index.md b/docs/en/engines/table-engines/log-family/index.md index b505fe1c474..910df09e67f 100644 --- a/docs/en/engines/table-engines/log-family/index.md +++ b/docs/en/engines/table-engines/log-family/index.md @@ -44,4 +44,4 @@ The `TinyLog` engine is the simplest in the family and provides the poorest func The `Log` and `StripeLog` engines support parallel data reading. When reading data, ClickHouse uses multiple threads. Each thread processes a separate data block. The `Log` engine uses a separate file for each column of the table. `StripeLog` stores all the data in one file. As a result, the `StripeLog` engine uses fewer file descriptors, but the `Log` engine provides higher efficiency when reading data. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/log_family/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/log_family/) diff --git a/docs/en/engines/table-engines/log-family/stripelog.md b/docs/en/engines/table-engines/log-family/stripelog.md index 693f5a21db2..62703245062 100644 --- a/docs/en/engines/table-engines/log-family/stripelog.md +++ b/docs/en/engines/table-engines/log-family/stripelog.md @@ -90,4 +90,4 @@ SELECT * FROM stripe_log_table ORDER BY timestamp └─────────────────────┴──────────────┴────────────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/stripelog/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/stripelog/) diff --git a/docs/en/engines/table-engines/log-family/tinylog.md b/docs/en/engines/table-engines/log-family/tinylog.md index ea2138e36fe..2407355a857 100644 --- a/docs/en/engines/table-engines/log-family/tinylog.md +++ b/docs/en/engines/table-engines/log-family/tinylog.md @@ -11,4 +11,4 @@ This table engine is typically used with the write-once method: write data one t Queries are executed in a single stream. In other words, this engine is intended for relatively small tables (up to about 1,000,000 rows). It makes sense to use this table engine if you have many small tables, since it’s simpler than the [Log](../../../engines/table-engines/log-family/log.md) engine (fewer files need to be opened). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/tinylog/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/tinylog/) diff --git a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md index 818830646cb..8c9f8dd8ce3 100644 --- a/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -100,4 +100,4 @@ GROUP BY StartDate ORDER BY StartDate; ``` -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/aggregatingmergetree/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/aggregatingmergetree/) diff --git a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md index 4ec976eda30..271b8b20fdb 100644 --- a/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -303,4 +303,4 @@ select * FROM UAct └─────────────────────┴───────────┴──────────┴──────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/collapsingmergetree/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/collapsingmergetree/) diff --git a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md index 535922875ef..2711c76aeb6 100644 --- a/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md +++ b/docs/en/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -5,6 +5,9 @@ toc_title: Custom Partitioning Key # Custom Partitioning Key {#custom-partitioning-key} +!!! warning "Warning" + In most cases you don't need partition key, and in most other cases you don't need partition key more granular than by months. Partitioning does not speed up queries (in contrast to the ORDER BY expression). You should never use too granular partitioning. Don't partition your data by client identifiers or names (instead make client identifier or name the first column in the ORDER BY expression). + Partitioning is available for the [MergeTree](../../../engines/table-engines/mergetree-family/mergetree.md) family tables (including [replicated](../../../engines/table-engines/mergetree-family/replication.md) tables). [Materialized views](../../../engines/table-engines/special/materializedview.md#materializedview) based on MergeTree tables support partitioning, as well. A partition is a logical combination of records in a table by a specified criterion. You can set a partition by an arbitrary criterion, such as by month, by day, or by event type. Each partition is stored separately to simplify manipulations of this data. When accessing the data, ClickHouse uses the smallest subset of partitions possible. @@ -124,4 +127,4 @@ Note that on the operating server, you cannot manually change the set of parts o ClickHouse allows you to perform operations with the partitions: delete them, copy from one table to another, or create a backup. See the list of all operations in the section [Manipulations With Partitions and Parts](../../../sql-reference/statements/alter/partition.md#alter_manipulations-with-partitions). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/custom_partitioning_key/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/custom_partitioning_key/) diff --git a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md index 33707709fdf..79ba06096b2 100644 --- a/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/graphitemergetree.md @@ -170,4 +170,4 @@ Fields for `pattern` and `default` sections: !!! warning "Warning" Data rollup is performed during merges. Usually, for old partitions, merges are not started, so for rollup it is necessary to trigger an unscheduled merge using [optimize](../../../sql-reference/statements/optimize.md). Or use additional tools, for example [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/graphitemergetree/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/graphitemergetree/) diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index 1ca7725b35c..f7118f7557e 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -69,7 +69,7 @@ For a description of parameters, see the [CREATE query description](../../../sql Use the `ORDER BY tuple()` syntax, if you do not need sorting. See [Selecting the Primary Key](#selecting-the-primary-key). -- `PARTITION BY` — The [partitioning key](../../../engines/table-engines/mergetree-family/custom-partitioning-key.md). Optional. +- `PARTITION BY` — The [partitioning key](../../../engines/table-engines/mergetree-family/custom-partitioning-key.md). Optional. In most cases you don't need partition key, and in most other cases you don't need partition key more granular than by months. Partitioning does not speed up queries (in contrast to the ORDER BY expression). You should never use too granular partitioning. Don't partition your data by client identifiers or names (instead make client identifier or name the first column in the ORDER BY expression). For partitioning by month, use the `toYYYYMM(date_column)` expression, where `date_column` is a column with a date of the type [Date](../../../sql-reference/data-types/date.md). The partition names here have the `"YYYYMM"` format. @@ -99,7 +99,9 @@ For a description of parameters, see the [CREATE query description](../../../sql - `use_minimalistic_part_header_in_zookeeper` — Storage method of the data parts headers in ZooKeeper. If `use_minimalistic_part_header_in_zookeeper=1`, then ZooKeeper stores less data. For more information, see the [setting description](../../../operations/server-configuration-parameters/settings.md#server-settings-use_minimalistic_part_header_in_zookeeper) in “Server configuration parameters”. - `min_merge_bytes_to_use_direct_io` — The minimum data volume for merge operation that is required for using direct I/O access to the storage disk. When merging data parts, ClickHouse calculates the total storage volume of all the data to be merged. If the volume exceeds `min_merge_bytes_to_use_direct_io` bytes, ClickHouse reads and writes the data to the storage disk using the direct I/O interface (`O_DIRECT` option). If `min_merge_bytes_to_use_direct_io = 0`, then direct I/O is disabled. Default value: `10 * 1024 * 1024 * 1024` bytes. - - `merge_with_ttl_timeout` — Minimum delay in seconds before repeating a merge with TTL. Default value: 86400 (1 day). + - `merge_with_ttl_timeout` — Minimum delay in seconds before repeating a merge with delete TTL. Default value: `14400` seconds (4 hours). + - `merge_with_recompression_ttl_timeout` — Minimum delay in seconds before repeating a merge with recompression TTL. Default value: `14400` seconds (4 hours). + - `try_fetch_recompressed_part_timeout` — Timeout (in seconds) before starting merge with recompression. During this time ClickHouse tries to fetch recompressed part from replica which assigned this merge with recompression. Default value: `7200` seconds (2 hours). - `write_final_mark` — Enables or disables writing the final index mark at the end of data part (after the last byte). Default value: 1. Don’t turn it off. - `merge_max_block_size` — Maximum number of rows in block for merge operations. Default value: 8192. - `storage_policy` — Storage policy. See [Using Multiple Block Devices for Data Storage](#table_engine-mergetree-multiple-volumes). @@ -333,7 +335,16 @@ SELECT count() FROM table WHERE u64 * i32 == 10 AND u64 * length(s) >= 1234 The optional `false_positive` parameter is the probability of receiving a false positive response from the filter. Possible values: (0, 1). Default value: 0.025. - Supported data types: `Int*`, `UInt*`, `Float*`, `Enum`, `Date`, `DateTime`, `String`, `FixedString`, `Array`, `LowCardinality`, `Nullable`. + Supported data types: `Int*`, `UInt*`, `Float*`, `Enum`, `Date`, `DateTime`, `String`, `FixedString`, `Array`, `LowCardinality`, `Nullable`, `UUID`, `Map`. + + For `Map` data type client can specify if index should be created for keys or values using [mapKeys](../../../sql-reference/functions/tuple-map-functions.md#mapkeys) or [mapValues](../../../sql-reference/functions/tuple-map-functions.md#mapvalues) function. + + Example of index creation for `Map` data type + +``` +INDEX map_key_index mapKeys(map_column) TYPE bloom_filter GRANULARITY 1 +INDEX map_key_index mapValues(map_column) TYPE bloom_filter GRANULARITY 1 +``` The following functions can use it: [equals](../../../sql-reference/functions/comparison-functions.md), [notEquals](../../../sql-reference/functions/comparison-functions.md), [in](../../../sql-reference/functions/in-functions.md), [notIn](../../../sql-reference/functions/in-functions.md), [has](../../../sql-reference/functions/array-functions.md). @@ -388,20 +399,27 @@ Functions with a constant argument that is less than ngram size can’t be used - `s != 1` - `NOT startsWith(s, 'test')` -### Projections {#projections} -Projections are like materialized views but defined in part-level. It provides consistency guarantees along with automatic usage in queries. +## Projections {#projections} +Projections are like [materialized views](../../../sql-reference/statements/create/view.md#materialized) but defined in part-level. It provides consistency guarantees along with automatic usage in queries. -#### Query {#projection-query} -A projection query is what defines a projection. It has the following grammar: +Projections are an experimental feature. To enable them you must set the [allow_experimental_projection_optimization](../../../operations/settings/settings.md#allow-experimental-projection-optimization) to `1`. See also the [force_optimize_projection](../../../operations/settings/settings.md#force-optimize-projection) setting. -`SELECT [GROUP BY] [ORDER BY]` +Projections are not supported in the `SELECT` statements with the [FINAL](../../../sql-reference/statements/select/from.md#select-from-final) modifier. -It implicitly selects data from the parent table. +### Projection Query {#projection-query} +A projection query is what defines a projection. It implicitly selects data from the parent table. +**Syntax** -#### Storage {#projection-storage} -Projections are stored inside the part directory. It's similar to an index but contains a subdirectory that stores an anonymous MergeTree table's part. The table is induced by the definition query of the projection. If there is a GROUP BY clause, the underlying storage engine becomes AggregatedMergeTree, and all aggregate functions are converted to AggregateFunction. If there is an ORDER BY clause, the MergeTree table will use it as its primary key expression. During the merge process, the projection part will be merged via its storage's merge routine. The checksum of the parent table's part will combine the projection's part. Other maintenance jobs are similar to skip indices. +```sql +SELECT [GROUP BY] [ORDER BY] +``` -#### Query Analysis {#projection-query-analysis} +Projections can be modified or dropped with the [ALTER](../../../sql-reference/statements/alter/projection.md) statement. + +### Projection Storage {#projection-storage} +Projections are stored inside the part directory. It's similar to an index but contains a subdirectory that stores an anonymous `MergeTree` table's part. The table is induced by the definition query of the projection. If there is a `GROUP BY` clause, the underlying storage engine becomes [AggregatingMergeTree](aggregatingmergetree.md), and all aggregate functions are converted to `AggregateFunction`. If there is an `ORDER BY` clause, the `MergeTree` table uses it as its primary key expression. During the merge process the projection part is merged via its storage's merge routine. The checksum of the parent table's part is combined with the projection's part. Other maintenance jobs are similar to skip indices. + +### Query Analysis {#projection-query-analysis} 1. Check if the projection can be used to answer the given query, that is, it generates the same answer as querying the base table. 2. Select the best feasible match, which contains the least granules to read. 3. The query pipeline which uses projections will be different from the one that uses the original parts. If the projection is absent in some parts, we can add the pipeline to "project" it on the fly. @@ -416,18 +434,20 @@ Reading from a table is automatically parallelized. Determines the lifetime of values. -The `TTL` clause can be set for the whole table and for each individual column. Table-level TTL can also specify logic of automatic move of data between disks and volumes. +The `TTL` clause can be set for the whole table and for each individual column. Table-level `TTL` can also specify the logic of automatic moving data between disks and volumes, or recompressing parts where all the data has been expired. Expressions must evaluate to [Date](../../../sql-reference/data-types/date.md) or [DateTime](../../../sql-reference/data-types/datetime.md) data type. -Example: +**Syntax** + +Setting time-to-live for a column: ``` sql TTL time_column TTL time_column + interval ``` -To define `interval`, use [time interval](../../../sql-reference/operators/index.md#operators-datetime) operators. +To define `interval`, use [time interval](../../../sql-reference/operators/index.md#operators-datetime) operators, for example: ``` sql TTL date_time + INTERVAL 1 MONTH @@ -440,9 +460,9 @@ When the values in the column expire, ClickHouse replaces them with the default The `TTL` clause can’t be used for key columns. -Examples: +**Examples** -Creating a table with TTL +Creating a table with `TTL`: ``` sql CREATE TABLE example_table @@ -475,11 +495,11 @@ ALTER TABLE example_table ### Table TTL {#mergetree-table-ttl} -Table can have an expression for removal of expired rows, and multiple expressions for automatic move of parts between [disks or volumes](#table_engine-mergetree-multiple-volumes). When rows in the table expire, ClickHouse deletes all corresponding rows. For parts moving feature, all rows of a part must satisfy the movement expression criteria. +Table can have an expression for removal of expired rows, and multiple expressions for automatic move of parts between [disks or volumes](#table_engine-mergetree-multiple-volumes). When rows in the table expire, ClickHouse deletes all corresponding rows. For parts moving or recompressing, all rows of a part must satisfy the `TTL` expression criteria. ``` sql TTL expr - [DELETE|TO DISK 'xxx'|TO VOLUME 'xxx'][, DELETE|TO DISK 'aaa'|TO VOLUME 'bbb'] ... + [DELETE|RECOMPRESS codec_name1|TO DISK 'xxx'|TO VOLUME 'xxx'][, DELETE|RECOMPRESS codec_name2|TO DISK 'aaa'|TO VOLUME 'bbb'] ... [WHERE conditions] [GROUP BY key_expr [SET v1 = aggr_func(v1) [, v2 = aggr_func(v2) ...]] ] ``` @@ -487,11 +507,12 @@ TTL expr Type of TTL rule may follow each TTL expression. It affects an action which is to be done once the expression is satisfied (reaches current time): - `DELETE` - delete expired rows (default action); +- `RECOMPRESS codec_name` - recompress data part with the `codec_name`; - `TO DISK 'aaa'` - move part to the disk `aaa`; - `TO VOLUME 'bbb'` - move part to the disk `bbb`; - `GROUP BY` - aggregate expired rows. -With `WHERE` clause you may specify which of the expired rows to delete or aggregate (it cannot be applied to moves). +With `WHERE` clause you may specify which of the expired rows to delete or aggregate (it cannot be applied to moves or recompression). `GROUP BY` expression must be a prefix of the table primary key. @@ -499,7 +520,7 @@ If a column is not part of the `GROUP BY` expression and is not set explicitly i **Examples** -Creating a table with TTL: +Creating a table with `TTL`: ``` sql CREATE TABLE example_table @@ -515,7 +536,7 @@ TTL d + INTERVAL 1 MONTH [DELETE], d + INTERVAL 2 WEEK TO DISK 'bbb'; ``` -Altering TTL of the table: +Altering `TTL` of the table: ``` sql ALTER TABLE example_table @@ -536,6 +557,21 @@ ORDER BY d TTL d + INTERVAL 1 MONTH DELETE WHERE toDayOfWeek(d) = 1; ``` +Creating a table, where expired rows are recompressed: + +```sql +CREATE TABLE table_for_recompression +( + d DateTime, + key UInt64, + value String +) ENGINE MergeTree() +ORDER BY tuple() +PARTITION BY key +TTL d + INTERVAL 1 MONTH RECOMPRESS CODEC(ZSTD(17)), d + INTERVAL 1 YEAR RECOMPRESS CODEC(LZ4HC(10)) +SETTINGS min_rows_for_wide_part = 0, min_bytes_for_wide_part = 0; +``` + Creating a table, where expired rows are aggregated. In result rows `x` contains the maximum value accross the grouped rows, `y` — the minimum value, and `d` — any occasional value from grouped rows. ``` sql @@ -552,14 +588,19 @@ ORDER BY (k1, k2) TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); ``` -**Removing Data** +### Removing Expired Data {#mergetree-removing-expired-data} -Data with an expired TTL is removed when ClickHouse merges data parts. +Data with an expired `TTL` is removed when ClickHouse merges data parts. -When ClickHouse see that data is expired, it performs an off-schedule merge. To control the frequency of such merges, you can set `merge_with_ttl_timeout`. If the value is too low, it will perform many off-schedule merges that may consume a lot of resources. +When ClickHouse detects that data is expired, it performs an off-schedule merge. To control the frequency of such merges, you can set `merge_with_ttl_timeout`. If the value is too low, it will perform many off-schedule merges that may consume a lot of resources. If you perform the `SELECT` query between merges, you may get expired data. To avoid it, use the [OPTIMIZE](../../../sql-reference/statements/optimize.md) query before `SELECT`. +**See Also** + +- [ttl_only_drop_parts](../../../operations/settings/settings.md#ttl_only_drop_parts) setting + + ## Using Multiple Block Devices for Data Storage {#table_engine-mergetree-multiple-volumes} ### Introduction {#introduction} diff --git a/docs/en/engines/table-engines/mergetree-family/replication.md b/docs/en/engines/table-engines/mergetree-family/replication.md index 277339f9b47..7cd58d35362 100644 --- a/docs/en/engines/table-engines/mergetree-family/replication.md +++ b/docs/en/engines/table-engines/mergetree-family/replication.md @@ -288,5 +288,7 @@ If the data in ZooKeeper was lost or damaged, you can save data by moving it to - [background_schedule_pool_size](../../../operations/settings/settings.md#background_schedule_pool_size) - [background_fetches_pool_size](../../../operations/settings/settings.md#background_fetches_pool_size) - [execute_merges_on_single_replica_time_threshold](../../../operations/settings/settings.md#execute-merges-on-single-replica-time-threshold) +- [max_replicated_fetches_network_bandwidth](../../../operations/settings/merge-tree-settings.md#max_replicated_fetches_network_bandwidth) +- [max_replicated_sends_network_bandwidth](../../../operations/settings/merge-tree-settings.md#max_replicated_sends_network_bandwidth) -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/replication/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/replication/) diff --git a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md index 36840e6fd0b..5726acf000e 100644 --- a/docs/en/engines/table-engines/mergetree-family/summingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/summingmergetree.md @@ -136,4 +136,4 @@ When requesting data, use the [sumMap(key, value)](../../../sql-reference/aggreg For nested data structure, you do not need to specify its columns in the tuple of columns for summation. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/summingmergetree/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/summingmergetree/) diff --git a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md index 93c35344e24..8266bf34876 100644 --- a/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -233,4 +233,4 @@ SELECT * FROM UAct FINAL This is a very inefficient way to select data. Don’t use it for large tables. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/versionedcollapsingmergetree/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/versionedcollapsingmergetree/) diff --git a/docs/en/engines/table-engines/special/buffer.md b/docs/en/engines/table-engines/special/buffer.md index 0e7f0a53da8..884774cbfae 100644 --- a/docs/en/engines/table-engines/special/buffer.md +++ b/docs/en/engines/table-engines/special/buffer.md @@ -75,4 +75,4 @@ A Buffer table is used when too many INSERTs are received from a large number of Note that it does not make sense to insert data one row at a time, even for Buffer tables. This will only produce a speed of a few thousand rows per second, while inserting larger blocks of data can produce over a million rows per second (see the section “Performance”). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/buffer/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/buffer/) diff --git a/docs/en/engines/table-engines/special/distributed.md b/docs/en/engines/table-engines/special/distributed.md index 5c911c6cc0a..368849359ef 100644 --- a/docs/en/engines/table-engines/special/distributed.md +++ b/docs/en/engines/table-engines/special/distributed.md @@ -198,4 +198,4 @@ When the `max_parallel_replicas` option is enabled, query processing is parallel - [Virtual columns](../../../engines/table-engines/special/index.md#table_engines-virtual_columns) - [background_distributed_schedule_pool_size](../../../operations/settings/settings.md#background_distributed_schedule_pool_size) -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/distributed/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/distributed/) diff --git a/docs/en/engines/table-engines/special/external-data.md b/docs/en/engines/table-engines/special/external-data.md index b5429ccad12..4ec90905fe5 100644 --- a/docs/en/engines/table-engines/special/external-data.md +++ b/docs/en/engines/table-engines/special/external-data.md @@ -63,4 +63,4 @@ $ curl -F 'passwd=@passwd.tsv;' 'http://localhost:8123/?query=SELECT+shell,+coun For distributed query processing, the temporary tables are sent to all the remote servers. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/external_data/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/external_data/) diff --git a/docs/en/engines/table-engines/special/file.md b/docs/en/engines/table-engines/special/file.md index 17eef2b4941..7673f45ca8d 100644 --- a/docs/en/engines/table-engines/special/file.md +++ b/docs/en/engines/table-engines/special/file.md @@ -24,7 +24,7 @@ The `Format` parameter specifies one of the available file formats. To perform `INSERT` queries – for output. The available formats are listed in the [Formats](../../../interfaces/formats.md#formats) section. -ClickHouse does not allow specifying filesystem path for`File`. It will use folder defined by [path](../../../operations/server-configuration-parameters/settings.md) setting in server configuration. +ClickHouse does not allow specifying filesystem path for `File`. It will use folder defined by [path](../../../operations/server-configuration-parameters/settings.md) setting in server configuration. When creating table using `File(Format)` it creates empty subdirectory in that folder. When data is written to that table, it’s put into `data.Format` file in that subdirectory. @@ -85,4 +85,4 @@ $ echo -e "1,2\n3,4" | clickhouse-local -q "CREATE TABLE table (a Int64, b Int64 - Indices - Replication -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/file/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/file/) diff --git a/docs/en/engines/table-engines/special/generate.md b/docs/en/engines/table-engines/special/generate.md index 393f7ccab23..fabe31897bb 100644 --- a/docs/en/engines/table-engines/special/generate.md +++ b/docs/en/engines/table-engines/special/generate.md @@ -56,4 +56,4 @@ SELECT * FROM generate_engine_table LIMIT 3 - Indices - Replication -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/generate/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/generate/) diff --git a/docs/en/engines/table-engines/special/materializedview.md b/docs/en/engines/table-engines/special/materializedview.md index 1d98eb2e3b7..75161829a7e 100644 --- a/docs/en/engines/table-engines/special/materializedview.md +++ b/docs/en/engines/table-engines/special/materializedview.md @@ -7,4 +7,4 @@ toc_title: MaterializedView Used for implementing materialized views (for more information, see [CREATE VIEW](../../../sql-reference/statements/create/view.md#materialized)). For storing data, it uses a different engine that was specified when creating the view. When reading from a table, it just uses that engine. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/materializedview/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/materializedview/) diff --git a/docs/en/engines/table-engines/special/memory.md b/docs/en/engines/table-engines/special/memory.md index b6402c2030b..eb557d36c50 100644 --- a/docs/en/engines/table-engines/special/memory.md +++ b/docs/en/engines/table-engines/special/memory.md @@ -15,4 +15,4 @@ Normally, using this table engine is not justified. However, it can be used for The Memory engine is used by the system for temporary tables with external query data (see the section “External data for processing a query”), and for implementing `GLOBAL IN` (see the section “IN operators”). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/memory/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/memory/) diff --git a/docs/en/engines/table-engines/special/merge.md b/docs/en/engines/table-engines/special/merge.md index 07cb778c6e9..19ce19fcc64 100644 --- a/docs/en/engines/table-engines/special/merge.md +++ b/docs/en/engines/table-engines/special/merge.md @@ -69,4 +69,4 @@ FROM WatchLog - [Virtual columns](../../../engines/table-engines/special/index.md#table_engines-virtual_columns) -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/merge/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/merge/) diff --git a/docs/en/engines/table-engines/special/null.md b/docs/en/engines/table-engines/special/null.md index 5f9a2ac679b..39ed9c1c1a6 100644 --- a/docs/en/engines/table-engines/special/null.md +++ b/docs/en/engines/table-engines/special/null.md @@ -10,4 +10,4 @@ When writing to a `Null` table, data is ignored. When reading from a `Null` tabl !!! info "Hint" However, you can create a materialized view on a `Null` table. So the data written to the table will end up affecting the view, but original raw data will still be discarded. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/null/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/null/) diff --git a/docs/en/engines/table-engines/special/set.md b/docs/en/engines/table-engines/special/set.md index a5a7e46af13..c38c2418093 100644 --- a/docs/en/engines/table-engines/special/set.md +++ b/docs/en/engines/table-engines/special/set.md @@ -20,4 +20,4 @@ When creating a table, the following settings are applied: - [persistent](../../../operations/settings/settings.md#persistent) -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/set/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/set/) diff --git a/docs/en/engines/table-engines/special/url.md b/docs/en/engines/table-engines/special/url.md index d3f577f8f4f..04f035206b5 100644 --- a/docs/en/engines/table-engines/special/url.md +++ b/docs/en/engines/table-engines/special/url.md @@ -78,4 +78,4 @@ SELECT * FROM url_engine_table - Indexes. - Replication. -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/url/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/url/) diff --git a/docs/en/engines/table-engines/special/view.md b/docs/en/engines/table-engines/special/view.md index c4f95adfa6d..9b847a0e2d5 100644 --- a/docs/en/engines/table-engines/special/view.md +++ b/docs/en/engines/table-engines/special/view.md @@ -7,4 +7,4 @@ toc_title: View 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). -[Original article](https://clickhouse.tech/docs/en/operations/table_engines/view/) +[Original article](https://clickhouse.com/docs/en/operations/table_engines/view/) diff --git a/docs/en/faq/general/columnar-database.md b/docs/en/faq/general/columnar-database.md index e30b4a94a87..cbc5f77d0ba 100644 --- a/docs/en/faq/general/columnar-database.md +++ b/docs/en/faq/general/columnar-database.md @@ -17,9 +17,9 @@ Key columnar database advantages are: Here is the illustration of the difference between traditional row-oriented systems and columnar databases when building reports: **Traditional row-oriented** -![Traditional row-oriented](https://clickhouse.tech/docs/en/images/row-oriented.gif#) +![Traditional row-oriented](https://clickhouse.com/docs/en/images/row-oriented.gif#) **Columnar** -![Columnar](https://clickhouse.tech/docs/en/images/column-oriented.gif#) +![Columnar](https://clickhouse.com/docs/en/images/column-oriented.gif#) A columnar database is a preferred choice for analytical applications because it allows to have many columns in a table just in case, but do not pay the cost for unused columns on read query execution time. Column-oriented databases are designed for big data processing because and data warehousing, they often natively scale using distributed clusters of low-cost hardware to increase throughput. ClickHouse does it with combination of [distributed](../../engines/table-engines/special/distributed.md) and [replicated](../../engines/table-engines/mergetree-family/replication.md) tables. diff --git a/docs/en/faq/general/index.md b/docs/en/faq/general/index.md index 8b4a1432a61..cd2368be1cf 100644 --- a/docs/en/faq/general/index.md +++ b/docs/en/faq/general/index.md @@ -21,4 +21,4 @@ Questions: !!! info "Don’t see what you were looking for?" Check out [other F.A.Q. categories](../../faq/index.md) or browse around main documentation articles found in the left sidebar. -{## [Original article](https://clickhouse.tech/docs/en/faq/general/) ##} +{## [Original article](https://clickhouse.com/docs/en/faq/general/) ##} diff --git a/docs/en/faq/general/ne-tormozit.md b/docs/en/faq/general/ne-tormozit.md index 17c5479fa6d..26ae741216d 100644 --- a/docs/en/faq/general/ne-tormozit.md +++ b/docs/en/faq/general/ne-tormozit.md @@ -23,4 +23,4 @@ If you haven’t seen one of those t-shirts in person, you can check them out on ![iframe](https://www.youtube.com/embed/bSyQahMVZ7w) -P.S. These t-shirts are not for sale, they are given away for free on most [ClickHouse Meetups](https://clickhouse.tech/#meet), usually for best questions or other forms of active participation. +P.S. These t-shirts are not for sale, they are given away for free on most [ClickHouse Meetups](https://clickhouse.com/#meet), usually for best questions or other forms of active participation. diff --git a/docs/en/faq/index.md b/docs/en/faq/index.md index 1e9c3b8ae64..d845b8c5898 100644 --- a/docs/en/faq/index.md +++ b/docs/en/faq/index.md @@ -43,4 +43,4 @@ Question candidates: - Window function workarounds (row_number, lag/lead, running diff/sum/average) ##} -{## [Original article](https://clickhouse.tech/docs/en/faq) ##} +{## [Original article](https://clickhouse.com/docs/en/faq) ##} diff --git a/docs/en/faq/integration/index.md b/docs/en/faq/integration/index.md index 74ff4d04c49..51a2593b751 100644 --- a/docs/en/faq/integration/index.md +++ b/docs/en/faq/integration/index.md @@ -16,4 +16,4 @@ Questions: !!! info "Don’t see what you were looking for?" Check out [other F.A.Q. categories](../../faq/index.md) or browse around main documentation articles found in the left sidebar. -{## [Original article](https://clickhouse.tech/docs/en/faq/integration/) ##} +{## [Original article](https://clickhouse.com/docs/en/faq/integration/) ##} diff --git a/docs/en/faq/operations/index.md b/docs/en/faq/operations/index.md index bb354771086..c0a6d85b66d 100644 --- a/docs/en/faq/operations/index.md +++ b/docs/en/faq/operations/index.md @@ -15,4 +15,4 @@ Questions: !!! info "Don’t see what you were looking for?" Check out [other F.A.Q. categories](../../faq/index.md) or browse around main documentation articles found in the left sidebar. -{## [Original article](https://clickhouse.tech/docs/en/faq/production/) ##} +{## [Original article](https://clickhouse.com/docs/en/faq/production/) ##} diff --git a/docs/en/faq/use-cases/index.md b/docs/en/faq/use-cases/index.md index 27090af3830..aac5493b105 100644 --- a/docs/en/faq/use-cases/index.md +++ b/docs/en/faq/use-cases/index.md @@ -15,4 +15,4 @@ Questions: !!! info "Don’t see what you were looking for?" Check out [other F.A.Q. categories](../../faq/index.md) or browse around main documentation articles found in the left sidebar. -{## [Original article](https://clickhouse.tech/docs/en/faq/use-cases/) ##} +{## [Original article](https://clickhouse.com/docs/en/faq/use-cases/) ##} diff --git a/docs/en/faq/use-cases/time-series.md b/docs/en/faq/use-cases/time-series.md index 4fc53c0bea4..bf97ac4b1e2 100644 --- a/docs/en/faq/use-cases/time-series.md +++ b/docs/en/faq/use-cases/time-series.md @@ -6,7 +6,7 @@ toc_priority: 101 # Can I Use ClickHouse As a Time-Series Database? {#can-i-use-clickhouse-as-a-time-series-database} -ClickHouse is a generic data storage solution for [OLAP](../../faq/general/olap.md) workloads, while there are many specialized time-series database management systems. Nevertheless, ClickHouse’s [focus on query execution speed](../../faq/general/why-clickhouse-is-so-fast.md) allows it to outperform specialized systems in many cases. There are many independent benchmarks on this topic out there ([example](https://medium.com/@AltinityDB/clickhouse-for-time-series-scalability-benchmarks-e181132a895b)), so we’re not going to conduct one here. Instead, let’s focus on ClickHouse features that are important to use if that’s your use case. +ClickHouse is a generic data storage solution for [OLAP](../../faq/general/olap.md) workloads, while there are many specialized time-series database management systems. Nevertheless, ClickHouse’s [focus on query execution speed](../../faq/general/why-clickhouse-is-so-fast.md) allows it to outperform specialized systems in many cases. There are many independent benchmarks on this topic out there, so we’re not going to conduct one here. Instead, let’s focus on ClickHouse features that are important to use if that’s your use case. First of all, there are **[specialized codecs](../../sql-reference/statements/create/table.md#create-query-specialized-codecs)** which make typical time-series. Either common algorithms like `DoubleDelta` and `Gorilla` or specific to ClickHouse like `T64`. diff --git a/docs/en/getting-started/example-datasets/amplab-benchmark.md b/docs/en/getting-started/example-datasets/amplab-benchmark.md index 27ddfd27f78..b410a3595ec 100644 --- a/docs/en/getting-started/example-datasets/amplab-benchmark.md +++ b/docs/en/getting-started/example-datasets/amplab-benchmark.md @@ -124,4 +124,4 @@ ORDER BY totalRevenue DESC LIMIT 1 ``` -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/amplab_benchmark/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/amplab_benchmark/) diff --git a/docs/en/getting-started/example-datasets/brown-benchmark.md b/docs/en/getting-started/example-datasets/brown-benchmark.md index c9b74a84a54..93049d1f76a 100644 --- a/docs/en/getting-started/example-datasets/brown-benchmark.md +++ b/docs/en/getting-started/example-datasets/brown-benchmark.md @@ -9,7 +9,7 @@ toc_title: Brown University Benchmark Download the data: ``` -wget https://datasets.clickhouse.tech/mgbench{1..3}.csv.xz +wget https://datasets.clickhouse.com/mgbench{1..3}.csv.xz ``` Unpack the data: @@ -411,6 +411,6 @@ ORDER BY yr, mo; ``` -The data is also available for interactive queries in the [Playground](https://gh-api.clickhouse.tech/play?user=play), [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIG1hY2hpbmVfbmFtZSwKICAgICAgIE1JTihjcHUpIEFTIGNwdV9taW4sCiAgICAgICBNQVgoY3B1KSBBUyBjcHVfbWF4LAogICAgICAgQVZHKGNwdSkgQVMgY3B1X2F2ZywKICAgICAgIE1JTihuZXRfaW4pIEFTIG5ldF9pbl9taW4sCiAgICAgICBNQVgobmV0X2luKSBBUyBuZXRfaW5fbWF4LAogICAgICAgQVZHKG5ldF9pbikgQVMgbmV0X2luX2F2ZywKICAgICAgIE1JTihuZXRfb3V0KSBBUyBuZXRfb3V0X21pbiwKICAgICAgIE1BWChuZXRfb3V0KSBBUyBuZXRfb3V0X21heCwKICAgICAgIEFWRyhuZXRfb3V0KSBBUyBuZXRfb3V0X2F2ZwpGUk9NICgKICBTRUxFQ1QgbWFjaGluZV9uYW1lLAogICAgICAgICBDT0FMRVNDRShjcHVfdXNlciwgMC4wKSBBUyBjcHUsCiAgICAgICAgIENPQUxFU0NFKGJ5dGVzX2luLCAwLjApIEFTIG5ldF9pbiwKICAgICAgICAgQ09BTEVTQ0UoYnl0ZXNfb3V0LCAwLjApIEFTIG5ldF9vdXQKICBGUk9NIG1nYmVuY2gubG9nczEKICBXSEVSRSBtYWNoaW5lX25hbWUgSU4gKCdhbmFuc2knLCdhcmFnb2cnLCd1cmQnKQogICAgQU5EIGxvZ190aW1lID49IFRJTUVTVEFNUCAnMjAxNy0wMS0xMSAwMDowMDowMCcKKSBBUyByCkdST1VQIEJZIG1hY2hpbmVfbmFtZQ==). +The data is also available for interactive queries in the [Playground](https://gh-api.clickhouse.com/play?user=play), [example](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIG1hY2hpbmVfbmFtZSwKICAgICAgIE1JTihjcHUpIEFTIGNwdV9taW4sCiAgICAgICBNQVgoY3B1KSBBUyBjcHVfbWF4LAogICAgICAgQVZHKGNwdSkgQVMgY3B1X2F2ZywKICAgICAgIE1JTihuZXRfaW4pIEFTIG5ldF9pbl9taW4sCiAgICAgICBNQVgobmV0X2luKSBBUyBuZXRfaW5fbWF4LAogICAgICAgQVZHKG5ldF9pbikgQVMgbmV0X2luX2F2ZywKICAgICAgIE1JTihuZXRfb3V0KSBBUyBuZXRfb3V0X21pbiwKICAgICAgIE1BWChuZXRfb3V0KSBBUyBuZXRfb3V0X21heCwKICAgICAgIEFWRyhuZXRfb3V0KSBBUyBuZXRfb3V0X2F2ZwpGUk9NICgKICBTRUxFQ1QgbWFjaGluZV9uYW1lLAogICAgICAgICBDT0FMRVNDRShjcHVfdXNlciwgMC4wKSBBUyBjcHUsCiAgICAgICAgIENPQUxFU0NFKGJ5dGVzX2luLCAwLjApIEFTIG5ldF9pbiwKICAgICAgICAgQ09BTEVTQ0UoYnl0ZXNfb3V0LCAwLjApIEFTIG5ldF9vdXQKICBGUk9NIG1nYmVuY2gubG9nczEKICBXSEVSRSBtYWNoaW5lX25hbWUgSU4gKCdhbmFuc2knLCdhcmFnb2cnLCd1cmQnKQogICAgQU5EIGxvZ190aW1lID49IFRJTUVTVEFNUCAnMjAxNy0wMS0xMSAwMDowMDowMCcKKSBBUyByCkdST1VQIEJZIG1hY2hpbmVfbmFtZQ==). -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/brown-benchmark/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/brown-benchmark/) diff --git a/docs/en/getting-started/example-datasets/cell-towers.md b/docs/en/getting-started/example-datasets/cell-towers.md index 7028b650ad1..1f681fc32d8 100644 --- a/docs/en/getting-started/example-datasets/cell-towers.md +++ b/docs/en/getting-started/example-datasets/cell-towers.md @@ -14,7 +14,7 @@ OpenCelliD Project is licensed under a Creative Commons Attribution-ShareAlike 4 ## Get the Dataset {#get-the-dataset} -1. Download the snapshot of the dataset from February 2021: [https://datasets.clickhouse.tech/cell_towers.csv.xz] (729 MB). +1. Download the snapshot of the dataset from February 2021: [https://datasets.clickhouse.com/cell_towers.csv.xz] (729 MB). 2. Validate the integrity (optional step): ``` @@ -127,6 +127,6 @@ SELECT count() FROM cell_towers WHERE pointInPolygon((lon, lat), (SELECT * FROM 1 rows in set. Elapsed: 0.067 sec. Processed 43.28 million rows, 692.42 MB (645.83 million rows/s., 10.33 GB/s.) ``` -The data is also available for interactive queries in the [Playground](https://gh-api.clickhouse.tech/play?user=play), [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIG1jYywgY291bnQoKSBGUk9NIGNlbGxfdG93ZXJzIEdST1VQIEJZIG1jYyBPUkRFUiBCWSBjb3VudCgpIERFU0M=). +The data is also available for interactive queries in the [Playground](https://gh-api.clickhouse.com/play?user=play), [example](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIG1jYywgY291bnQoKSBGUk9NIGNlbGxfdG93ZXJzIEdST1VQIEJZIG1jYyBPUkRFUiBCWSBjb3VudCgpIERFU0M=). Although you cannot create temporary tables there. \ No newline at end of file diff --git a/docs/en/getting-started/example-datasets/criteo.md b/docs/en/getting-started/example-datasets/criteo.md index 261d1606fa4..08298172c70 100644 --- a/docs/en/getting-started/example-datasets/criteo.md +++ b/docs/en/getting-started/example-datasets/criteo.md @@ -76,4 +76,4 @@ INSERT INTO criteo SELECT date, clicked, int1, int2, int3, int4, int5, int6, int DROP TABLE criteo_log; ``` -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/criteo/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/criteo/) diff --git a/docs/en/getting-started/example-datasets/github-events.md b/docs/en/getting-started/example-datasets/github-events.md index a6c71733832..e470e88b182 100644 --- a/docs/en/getting-started/example-datasets/github-events.md +++ b/docs/en/getting-started/example-datasets/github-events.md @@ -7,5 +7,5 @@ toc_title: GitHub Events Dataset contains all events on GitHub from 2011 to Dec 6 2020, the size is 3.1 billion records. Download size is 75 GB and it will require up to 200 GB space on disk if stored in a table with lz4 compression. -Full dataset description, insights, download instruction and interactive queries are posted [here](https://github-sql.github.io/explorer/). +Full dataset description, insights, download instruction and interactive queries are posted [here](https://ghe.clickhouse.tech/). diff --git a/docs/en/getting-started/example-datasets/index.md b/docs/en/getting-started/example-datasets/index.md index e61c76970a7..6dae6c20073 100644 --- a/docs/en/getting-started/example-datasets/index.md +++ b/docs/en/getting-started/example-datasets/index.md @@ -13,16 +13,16 @@ The list of documented datasets: - [GitHub Events](../../getting-started/example-datasets/github-events.md) - [Anonymized Yandex.Metrica Dataset](../../getting-started/example-datasets/metrica.md) - [Recipes](../../getting-started/example-datasets/recipes.md) -- [OnTime](../../getting-started/example-datasets/ontime.md) -- [OpenSky](../../getting-started/example-datasets/opensky.md) -- [New York Taxi Data](../../getting-started/example-datasets/nyc-taxi.md) -- [UK Property Price Paid](../../getting-started/example-datasets/uk-price-paid.md) -- [What's on the Menu?](../../getting-started/example-datasets/menus.md) - [Star Schema Benchmark](../../getting-started/example-datasets/star-schema.md) - [WikiStat](../../getting-started/example-datasets/wikistat.md) - [Terabyte of Click Logs from Criteo](../../getting-started/example-datasets/criteo.md) - [AMPLab Big Data Benchmark](../../getting-started/example-datasets/amplab-benchmark.md) - [Brown University Benchmark](../../getting-started/example-datasets/brown-benchmark.md) +- [New York Taxi Data](../../getting-started/example-datasets/nyc-taxi.md) +- [OpenSky](../../getting-started/example-datasets/opensky.md) +- [UK Property Price Paid](../../getting-started/example-datasets/uk-price-paid.md) - [Cell Towers](../../getting-started/example-datasets/cell-towers.md) +- [What's on the Menu?](../../getting-started/example-datasets/menus.md) +- [OnTime](../../getting-started/example-datasets/ontime.md) -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets) diff --git a/docs/en/getting-started/example-datasets/menus.md b/docs/en/getting-started/example-datasets/menus.md index 8f330f39226..665944b3e6f 100644 --- a/docs/en/getting-started/example-datasets/menus.md +++ b/docs/en/getting-started/example-datasets/menus.md @@ -3,7 +3,7 @@ toc_priority: 21 toc_title: Menus --- -# New York Public Library "What's on the Menu?" Dataset +# New York Public Library "What's on the Menu?" Dataset {#menus-dataset} The dataset is created by the New York Public Library. It contains historical data on the menus of hotels, restaurants and cafes with the dishes along with their prices. @@ -11,34 +11,38 @@ Source: http://menus.nypl.org/data The data is in public domain. The data is from library's archive and it may be incomplete and difficult for statistical analysis. Nevertheless it is also very yummy. -The size is just 1.3 million records about dishes in the menus (a very small data volume for ClickHouse, but it's still a good example). +The size is just 1.3 million records about dishes in the menus — it's a very small data volume for ClickHouse, but it's still a good example. -## Download the Dataset +## Download the Dataset {#download-dataset} -``` +Run the command: + +```bash wget https://s3.amazonaws.com/menusdata.nypl.org/gzips/2021_08_01_07_01_17_data.tgz ``` Replace the link to the up to date link from http://menus.nypl.org/data if needed. Download size is about 35 MB. -## Unpack the Dataset +## Unpack the Dataset {#unpack-dataset} -``` +```bash tar xvf 2021_08_01_07_01_17_data.tgz ``` Uncompressed size is about 150 MB. The data is normalized consisted of four tables: -- Menu: information about menus: the name of the restaurant, the date when menu was seen, etc; -- Dish: information about dishes: the name of the dish along with some characteristic; -- MenuPage: information about the pages in the menus; every page belongs to some menu; -- MenuItem: an item of the menu - a dish along with its price on some menu page: links to dish and menu page. +- `Menu` — Information about menus: the name of the restaurant, the date when menu was seen, etc. +- `Dish` — Information about dishes: the name of the dish along with some characteristic. +- `MenuPage` — Information about the pages in the menus, because every page belongs to some menu. +- `MenuItem` — An item of the menu. A dish along with its price on some menu page: links to dish and menu page. -## Create the Tables +## Create the Tables {#create-tables} -``` +We use [Decimal](../../sql-reference/data-types/decimal.md) data type to store prices. + +```sql CREATE TABLE dish ( id UInt32, @@ -101,35 +105,33 @@ CREATE TABLE menu_item ) ENGINE = MergeTree ORDER BY id; ``` -We use `Decimal` data type to store prices. Everything else is quite straightforward. +## Import the Data {#import-data} -## Import Data +Upload data into ClickHouse, run: -Upload data into ClickHouse: - -``` +```bash clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO dish FORMAT CSVWithNames" < Dish.csv clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu FORMAT CSVWithNames" < Menu.csv clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu_page FORMAT CSVWithNames" < MenuPage.csv clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --date_time_input_format best_effort --query "INSERT INTO menu_item FORMAT CSVWithNames" < MenuItem.csv ``` -We use `CSVWithNames` format as the data is represented by CSV with header. +We use [CSVWithNames](../../interfaces/formats.md#csvwithnames) format as the data is represented by CSV with header. We disable `format_csv_allow_single_quotes` as only double quotes are used for data fields and single quotes can be inside the values and should not confuse the CSV parser. -We disable `input_format_null_as_default` as our data does not have NULLs. Otherwise ClickHouse will try to parse `\N` sequences and can be confused with `\` in data. +We disable [input_format_null_as_default](../../operations/settings/settings.md#settings-input-format-null-as-default) as our data does not have [NULL](../../sql-reference/syntax.md#null-literal). Otherwise ClickHouse will try to parse `\N` sequences and can be confused with `\` in data. -The setting `--date_time_input_format best_effort` allows to parse `DateTime` fields in wide variety of formats. For example, ISO-8601 without seconds like '2000-01-01 01:02' will be recognized. Without this setting only fixed DateTime format is allowed. +The setting [date_time_input_format best_effort](../../operations/settings/settings.md#settings-date_time_input_format) allows to parse [DateTime](../../sql-reference/data-types/datetime.md) fields in wide variety of formats. For example, ISO-8601 without seconds like '2000-01-01 01:02' will be recognized. Without this setting only fixed DateTime format is allowed. -## Denormalize the Data +## Denormalize the Data {#denormalize-data} -Data is presented in multiple tables in normalized form. It means you have to perform JOINs if you want to query, e.g. dish names from menu items. -For typical analytical tasks it is way more efficient to deal with pre-JOINed data to avoid doing JOIN every time. It is called "denormalized" data. +Data is presented in multiple tables in [normalized form](https://en.wikipedia.org/wiki/Database_normalization#Normal_forms). It means you have to perform [JOIN](../../sql-reference/statements/select/join.md#select-join) if you want to query, e.g. dish names from menu items. +For typical analytical tasks it is way more efficient to deal with pre-JOINed data to avoid doing `JOIN` every time. It is called "denormalized" data. -We will create a table that will contain all the data JOINed together: +We will create a table `menu_item_denorm` where will contain all the data JOINed together: -``` +```sql CREATE TABLE menu_item_denorm ENGINE = MergeTree ORDER BY (dish_name, created_at) AS SELECT @@ -171,21 +173,32 @@ AS SELECT FROM menu_item JOIN dish ON menu_item.dish_id = dish.id JOIN menu_page ON menu_item.menu_page_id = menu_page.id - JOIN menu ON menu_page.menu_id = menu.id + JOIN menu ON menu_page.menu_id = menu.id; ``` -## Validate the Data +## Validate the Data {#validate-data} -``` -SELECT count() FROM menu_item_denorm -1329175 +Query: + +```sql +SELECT count() FROM menu_item_denorm; ``` -## Run Some Queries - -Averaged historical prices of dishes: +Result: +```text +┌─count()─┐ +│ 1329175 │ +└─────────┘ ``` + +## Run Some Queries {#run-queries} + +### Averaged historical prices of dishes {#query-averaged-historical-prices} + +Query: + +```sql SELECT round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, count(), @@ -194,8 +207,12 @@ SELECT FROM menu_item_denorm WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) GROUP BY d -ORDER BY d ASC +ORDER BY d ASC; +``` +Result: + +```text ┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 100, 100)─┐ │ 1850 │ 618 │ 1.5 │ █▍ │ │ 1860 │ 1634 │ 1.29 │ █▎ │ @@ -215,15 +232,15 @@ ORDER BY d ASC │ 2000 │ 2467 │ 11.85 │ ███████████▋ │ │ 2010 │ 597 │ 25.66 │ █████████████████████████▋ │ └──────┴─────────┴──────────────────────┴──────────────────────────────┘ - -17 rows in set. Elapsed: 0.044 sec. Processed 1.33 million rows, 54.62 MB (30.00 million rows/s., 1.23 GB/s.) ``` Take it with a grain of salt. -### Burger Prices: +### Burger Prices {#query-burger-prices} -``` +Query: + +```sql SELECT round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, count(), @@ -232,8 +249,12 @@ SELECT FROM menu_item_denorm WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%burger%') GROUP BY d -ORDER BY d ASC +ORDER BY d ASC; +``` +Result: + +```text ┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)───────────┐ │ 1880 │ 2 │ 0.42 │ ▋ │ │ 1890 │ 7 │ 0.85 │ █▋ │ @@ -250,13 +271,13 @@ ORDER BY d ASC │ 2000 │ 21 │ 7.14 │ ██████████████▎ │ │ 2010 │ 6 │ 18.42 │ ████████████████████████████████████▋ │ └──────┴─────────┴──────────────────────┴───────────────────────────────────────┘ - -14 rows in set. Elapsed: 0.052 sec. Processed 1.33 million rows, 94.15 MB (25.48 million rows/s., 1.80 GB/s.) ``` -### Vodka: +### Vodka {#query-vodka} -``` +Query: + +```sql SELECT round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, count(), @@ -265,8 +286,12 @@ SELECT FROM menu_item_denorm WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%vodka%') GROUP BY d -ORDER BY d ASC +ORDER BY d ASC; +``` +Result: + +```text ┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)─┐ │ 1910 │ 2 │ 0 │ │ │ 1920 │ 1 │ 0.3 │ ▌ │ @@ -282,11 +307,13 @@ ORDER BY d ASC To get vodka we have to write `ILIKE '%vodka%'` and this definitely makes a statement. -### Caviar: +### Caviar {#query-caviar} Let's print caviar prices. Also let's print a name of any dish with caviar. -``` +Query: + +```sql SELECT round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, count(), @@ -296,8 +323,12 @@ SELECT FROM menu_item_denorm WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%caviar%') GROUP BY d -ORDER BY d ASC +ORDER BY d ASC; +``` +Result: + +```text ┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)──────┬─any(dish_name)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ 1090 │ 1 │ 0 │ │ Caviar │ │ 1880 │ 3 │ 0 │ │ Caviar │ @@ -319,6 +350,6 @@ ORDER BY d ASC At least they have caviar with vodka. Very nice. -### Test it in Playground +## Online Playground {#playground} -The data is uploaded to ClickHouse Playground, [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICByb3VuZCh0b1VJbnQzMk9yWmVybyhleHRyYWN0KG1lbnVfZGF0ZSwgJ15cXGR7NH0nKSksIC0xKSBBUyBkLAogICAgY291bnQoKSwKICAgIHJvdW5kKGF2ZyhwcmljZSksIDIpLAogICAgYmFyKGF2ZyhwcmljZSksIDAsIDUwLCAxMDApLAogICAgYW55KGRpc2hfbmFtZSkKRlJPTSBtZW51X2l0ZW1fZGVub3JtCldIRVJFIChtZW51X2N1cnJlbmN5IElOICgnRG9sbGFycycsICcnKSkgQU5EIChkID4gMCkgQU5EIChkIDwgMjAyMikgQU5EIChkaXNoX25hbWUgSUxJS0UgJyVjYXZpYXIlJykKR1JPVVAgQlkgZApPUkRFUiBCWSBkIEFTQw==). +The data is uploaded to ClickHouse Playground, [example](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUCiAgICByb3VuZCh0b1VJbnQzMk9yWmVybyhleHRyYWN0KG1lbnVfZGF0ZSwgJ15cXGR7NH0nKSksIC0xKSBBUyBkLAogICAgY291bnQoKSwKICAgIHJvdW5kKGF2ZyhwcmljZSksIDIpLAogICAgYmFyKGF2ZyhwcmljZSksIDAsIDUwLCAxMDApLAogICAgYW55KGRpc2hfbmFtZSkKRlJPTSBtZW51X2l0ZW1fZGVub3JtCldIRVJFIChtZW51X2N1cnJlbmN5IElOICgnRG9sbGFycycsICcnKSkgQU5EIChkID4gMCkgQU5EIChkIDwgMjAyMikgQU5EIChkaXNoX25hbWUgSUxJS0UgJyVjYXZpYXIlJykKR1JPVVAgQlkgZApPUkRFUiBCWSBkIEFTQw==). diff --git a/docs/en/getting-started/example-datasets/metrica.md b/docs/en/getting-started/example-datasets/metrica.md index 159c99b15a0..483220d12ee 100644 --- a/docs/en/getting-started/example-datasets/metrica.md +++ b/docs/en/getting-started/example-datasets/metrica.md @@ -7,14 +7,14 @@ toc_title: Yandex.Metrica Data Dataset consists of two tables containing anonymized data about hits (`hits_v1`) and visits (`visits_v1`) of Yandex.Metrica. You can read more about Yandex.Metrica in [ClickHouse history](../../introduction/history.md) section. -The dataset consists of two tables, either of them can be downloaded as a compressed `tsv.xz` file or as prepared partitions. In addition to that, an extended version of the `hits` table containing 100 million rows is available as TSV at https://datasets.clickhouse.tech/hits/tsv/hits_100m_obfuscated_v1.tsv.xz and as prepared partitions at https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz. +The dataset consists of two tables, either of them can be downloaded as a compressed `tsv.xz` file or as prepared partitions. In addition to that, an extended version of the `hits` table containing 100 million rows is available as TSV at https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz and as prepared partitions at https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz. ## Obtaining Tables from Prepared Partitions {#obtaining-tables-from-prepared-partitions} Download and import hits table: ``` bash -curl -O https://datasets.clickhouse.tech/hits/partitions/hits_v1.tar +curl -O https://datasets.clickhouse.com/hits/partitions/hits_v1.tar tar xvf hits_v1.tar -C /var/lib/clickhouse # path to ClickHouse data directory # check permissions on unpacked data, fix if required sudo service clickhouse-server restart @@ -24,7 +24,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" Download and import visits: ``` bash -curl -O https://datasets.clickhouse.tech/visits/partitions/visits_v1.tar +curl -O https://datasets.clickhouse.com/visits/partitions/visits_v1.tar tar xvf visits_v1.tar -C /var/lib/clickhouse # path to ClickHouse data directory # check permissions on unpacked data, fix if required sudo service clickhouse-server restart @@ -36,13 +36,17 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.visits_v1" Download and import hits from compressed TSV file: ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv # Validate the checksum md5sum hits_v1.tsv # Checksum should be equal to: f3631b6295bf06989c1437491f7592cb # now create table clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" +# for hits_v1 clickhouse-client --query "CREATE TABLE datasets.hits_v1 ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" +# for hits_100m_obfuscated +clickhouse-client --query="CREATE TABLE hits_100m_obfuscated (WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, Refresh UInt8, RefererCategoryID UInt16, RefererRegionID UInt32, URLCategoryID UInt16, URLRegionID UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, OriginalURL String, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), LocalEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, RemoteIP UInt32, WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming UInt32, DNSTiming UInt32, ConnectTiming UInt32, ResponseStartTiming UInt32, ResponseEndTiming UInt32, FetchTiming UInt32, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" + # import data cat hits_v1.tsv | clickhouse-client --query "INSERT INTO datasets.hits_v1 FORMAT TSV" --max_insert_block_size=100000 # optionally you can optimize table @@ -53,7 +57,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" Download and import visits from compressed tsv-file: ``` bash -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv # Validate the checksum md5sum visits_v1.tsv # Checksum should be equal to: 6dafe1a0f24e59e3fc2d0fed85601de6 diff --git a/docs/en/getting-started/example-datasets/nyc-taxi.md b/docs/en/getting-started/example-datasets/nyc-taxi.md index 38a87a674f9..b3233315db3 100644 --- a/docs/en/getting-started/example-datasets/nyc-taxi.md +++ b/docs/en/getting-started/example-datasets/nyc-taxi.md @@ -283,7 +283,7 @@ Among other things, you can run the OPTIMIZE query on MergeTree. But it’s not ## Download of Prepared Partitions {#download-of-prepared-partitions} ``` bash -$ curl -O https://datasets.clickhouse.tech/trips_mergetree/partitions/trips_mergetree.tar +$ curl -O https://datasets.clickhouse.com/trips_mergetree/partitions/trips_mergetree.tar $ tar xvf trips_mergetree.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -385,4 +385,4 @@ We ran queries using a client located in a Yandex datacenter in Finland on a clu | 3 | 0.212 | 0.438 | 0.733 | 1.241 | | 140 | 0.028 | 0.043 | 0.051 | 0.072 | -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/nyc_taxi/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/nyc_taxi/) diff --git a/docs/en/getting-started/example-datasets/ontime.md b/docs/en/getting-started/example-datasets/ontime.md index dfa1d7ff964..bcba4cfb77d 100644 --- a/docs/en/getting-started/example-datasets/ontime.md +++ b/docs/en/getting-started/example-datasets/ontime.md @@ -149,7 +149,7 @@ ls -1 *.zip | xargs -I{} -P $(nproc) bash -c "echo {}; unzip -cq {} '*.csv' | se ## Download of Prepared Partitions {#download-of-prepared-partitions} ``` bash -$ curl -O https://datasets.clickhouse.tech/ontime/partitions/ontime.tar +$ curl -O https://datasets.clickhouse.com/ontime/partitions/ontime.tar $ tar xvf ontime.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -393,7 +393,7 @@ ORDER BY c DESC LIMIT 10; ``` -You can also play with the data in Playground, [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIERheU9mV2VlaywgY291bnQoKikgQVMgYwpGUk9NIG9udGltZQpXSEVSRSBZZWFyPj0yMDAwIEFORCBZZWFyPD0yMDA4CkdST1VQIEJZIERheU9mV2VlawpPUkRFUiBCWSBjIERFU0M7Cg==). +You can also play with the data in Playground, [example](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIERheU9mV2VlaywgY291bnQoKikgQVMgYwpGUk9NIG9udGltZQpXSEVSRSBZZWFyPj0yMDAwIEFORCBZZWFyPD0yMDA4CkdST1VQIEJZIERheU9mV2VlawpPUkRFUiBCWSBjIERFU0M7Cg==). This performance test was created by Vadim Tkachenko. See: @@ -404,4 +404,4 @@ This performance test was created by Vadim Tkachenko. See: - https://www.percona.com/blog/2016/01/07/apache-spark-with-air-ontime-performance-data/ - http://nickmakos.blogspot.ru/2012/08/analyzing-air-traffic-performance-with.html -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/ontime/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/ontime/) diff --git a/docs/en/getting-started/example-datasets/opensky.md b/docs/en/getting-started/example-datasets/opensky.md index c9f6729cdd7..2d901397cb2 100644 --- a/docs/en/getting-started/example-datasets/opensky.md +++ b/docs/en/getting-started/example-datasets/opensky.md @@ -3,7 +3,7 @@ toc_priority: 20 toc_title: OpenSky --- -# Crowdsourced air traffic data from The OpenSky Network 2020 +# Crowdsourced air traffic data from The OpenSky Network 2020 {#opensky} "The data in this dataset is derived and cleaned from the full OpenSky dataset to illustrate the development of air traffic during the COVID-19 pandemic. It spans all flights seen by the network's more than 2500 members since 1 January 2019. More data will be periodically included in the dataset until the end of the COVID-19 pandemic". @@ -14,17 +14,19 @@ Martin Strohmeier, Xavier Olive, Jannis Lübbe, Matthias Schäfer, and Vincent L Earth System Science Data 13(2), 2021 https://doi.org/10.5194/essd-13-357-2021 -## Download the Dataset +## Download the Dataset {#download-dataset} -``` +Run the command: + +```bash wget -O- https://zenodo.org/record/5092942 | grep -oP 'https://zenodo.org/record/5092942/files/flightlist_\d+_\d+\.csv\.gz' | xargs wget ``` Download will take about 2 minutes with good internet connection. There are 30 files with total size of 4.3 GB. -## Create the Table +## Create the Table {#create-table} -``` +```sql CREATE TABLE opensky ( callsign String, @@ -46,69 +48,101 @@ CREATE TABLE opensky ) ENGINE = MergeTree ORDER BY (origin, destination, callsign); ``` -## Import Data +## Import Data {#import-data} Upload data into ClickHouse in parallel: -``` -ls -1 flightlist_*.csv.gz | xargs -P100 -I{} bash -c ' - gzip -c -d "{}" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"' +```bash +ls -1 flightlist_*.csv.gz | xargs -P100 -I{} bash -c 'gzip -c -d "{}" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"' ``` -Here we pass the list of files (`ls -1 flightlist_*.csv.gz`) to `xargs` for parallel processing. +- Here we pass the list of files (`ls -1 flightlist_*.csv.gz`) to `xargs` for parallel processing. `xargs -P100` specifies to use up to 100 parallel workers but as we only have 30 files, the number of workers will be only 30. +- For every file, `xargs` will run a script with `bash -c`. The script has substitution in form of `{}` and the `xargs` command will substitute the filename to it (we have asked it for `xargs` with `-I{}`). +- The script will decompress the file (`gzip -c -d "{}"`) to standard output (`-c` parameter) and the output is redirected to `clickhouse-client`. +- We also asked to parse [DateTime](../../sql-reference/data-types/datetime.md) fields with extended parser ([--date_time_input_format best_effort](../../operations/settings/settings.md#settings-date_time_input_format)) to recognize ISO-8601 format with timezone offsets. -For every file, `xargs` will run a script with `bash -c`. The script has substitution in form of `{}` and the `xargs` command will substitute the filename to it (we have asked it for xargs with `-I{}`). - -The script will decompress the file (`gzip -c -d "{}"`) to standard output (`-c` parameter) and the output is redirected to `clickhouse-client`. - -Finally, `clickhouse-client` will do insertion. It will read input data in `CSVWithNames` format. We also asked to parse DateTime fields with extended parser (`--date_time_input_format best_effort`) to recognize ISO-8601 format with timezone offsets. +Finally, `clickhouse-client` will do insertion. It will read input data in [CSVWithNames](../../interfaces/formats.md#csvwithnames) format. Parallel upload takes 24 seconds. If you don't like parallel upload, here is sequential variant: -``` + +```bash for file in flightlist_*.csv.gz; do gzip -c -d "$file" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"; done ``` -## Validate the Data +## Validate the Data {#validate-data} -``` -SELECT count() FROM opensky -66010819 +Query: + +```sql +SELECT count() FROM opensky; ``` -The size of dataset in ClickHouse is just 2.64 GiB: +Result: -``` -SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'opensky' -2.64 GiB +```text +┌──count()─┐ +│ 66010819 │ +└──────────┘ ``` -## Run Some Queries +The size of dataset in ClickHouse is just 2.66 GiB, check it. -Total distance travelled is 68 billion kilometers: +Query: +```sql +SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'opensky'; ``` -SELECT formatReadableQuantity(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) / 1000) FROM opensky +Result: + +```text +┌─formatReadableSize(total_bytes)─┐ +│ 2.66 GiB │ +└─────────────────────────────────┘ +``` + +## Run Some Queries {#run-queries} + +Total distance travelled is 68 billion kilometers. + +Query: + +```sql +SELECT formatReadableQuantity(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) / 1000) FROM opensky; +``` + +Result: + +```text ┌─formatReadableQuantity(divide(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)), 1000))─┐ │ 68.72 billion │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ``` Average flight distance is around 1000 km. -``` -SELECT avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) FROM opensky +Query: + +```sql +SELECT avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) FROM opensky; +``` + +Result: + +```text ┌─avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2))─┐ │ 1041090.6465708319 │ └────────────────────────────────────────────────────────────────────┘ ``` -### Most busy origin airports and the average distance seen: +### Most busy origin airports and the average distance seen {#busy-airports-average-distance} -``` +Query: + +```sql SELECT origin, count(), @@ -118,10 +152,12 @@ FROM opensky WHERE origin != '' GROUP BY origin ORDER BY count() DESC -LIMIT 100 +LIMIT 100; +``` -Query id: f9010ea5-97d0-45a3-a5bd-9657906cd105 +Result: +```text ┌─origin─┬─count()─┬─distance─┬─bar────────────────────────────────────┐ 1. │ KORD │ 745007 │ 1546108 │ ███████████████▍ │ 2. │ KDFW │ 696702 │ 1358721 │ █████████████▌ │ @@ -224,13 +260,13 @@ Query id: f9010ea5-97d0-45a3-a5bd-9657906cd105 99. │ EDDT │ 115122 │ 941740 │ █████████▍ │ 100. │ EFHK │ 114860 │ 1629143 │ ████████████████▎ │ └────────┴─────────┴──────────┴────────────────────────────────────────┘ - -100 rows in set. Elapsed: 0.186 sec. Processed 48.31 million rows, 2.17 GB (259.27 million rows/s., 11.67 GB/s.) ``` -### Number of flights from three major Moscow airports, weekly: +### Number of flights from three major Moscow airports, weekly {#flights-from-moscow} -``` +Query: + +```sql SELECT toMonday(day) AS k, count() AS c, @@ -238,10 +274,12 @@ SELECT FROM opensky WHERE origin IN ('UUEE', 'UUDD', 'UUWW') GROUP BY k -ORDER BY k ASC +ORDER BY k ASC; +``` -Query id: 1b446157-9519-4cc4-a1cb-178dfcc15a8e +Result: +```text ┌──────────k─┬────c─┬─bar──────────────────────────────────────────────────────────────────────────┐ 1. │ 2018-12-31 │ 5248 │ ████████████████████████████████████████████████████▍ │ 2. │ 2019-01-07 │ 6302 │ ███████████████████████████████████████████████████████████████ │ @@ -375,10 +413,8 @@ Query id: 1b446157-9519-4cc4-a1cb-178dfcc15a8e 130. │ 2021-06-21 │ 6061 │ ████████████████████████████████████████████████████████████▌ │ 131. │ 2021-06-28 │ 2554 │ █████████████████████████▌ │ └────────────┴──────┴──────────────────────────────────────────────────────────────────────────────┘ - -131 rows in set. Elapsed: 0.014 sec. Processed 655.36 thousand rows, 11.14 MB (47.56 million rows/s., 808.48 MB/s.) ``` -### Test it in Playground +### Online Playground {#playground} -The data is uploaded to ClickHouse Playground, [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICBvcmlnaW4sCiAgICBjb3VudCgpLAogICAgcm91bmQoYXZnKGdlb0Rpc3RhbmNlKGxvbmdpdHVkZV8xLCBsYXRpdHVkZV8xLCBsb25naXR1ZGVfMiwgbGF0aXR1ZGVfMikpKSBBUyBkaXN0YW5jZSwKICAgIGJhcihkaXN0YW5jZSwgMCwgMTAwMDAwMDAsIDEwMCkgQVMgYmFyCkZST00gb3BlbnNreQpXSEVSRSBvcmlnaW4gIT0gJycKR1JPVVAgQlkgb3JpZ2luCk9SREVSIEJZIGNvdW50KCkgREVTQwpMSU1JVCAxMDA=). +You can test other queries to this data set using the interactive resource [Online Playground](https://gh-api.clickhouse.com/play?user=play). For example, [like this](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUCiAgICBvcmlnaW4sCiAgICBjb3VudCgpLAogICAgcm91bmQoYXZnKGdlb0Rpc3RhbmNlKGxvbmdpdHVkZV8xLCBsYXRpdHVkZV8xLCBsb25naXR1ZGVfMiwgbGF0aXR1ZGVfMikpKSBBUyBkaXN0YW5jZSwKICAgIGJhcihkaXN0YW5jZSwgMCwgMTAwMDAwMDAsIDEwMCkgQVMgYmFyCkZST00gb3BlbnNreQpXSEVSRSBvcmlnaW4gIT0gJycKR1JPVVAgQlkgb3JpZ2luCk9SREVSIEJZIGNvdW50KCkgREVTQwpMSU1JVCAxMDA=). However, please note that you cannot create temporary tables here. diff --git a/docs/en/getting-started/example-datasets/recipes.md b/docs/en/getting-started/example-datasets/recipes.md index 22c068af358..70a56a0547f 100644 --- a/docs/en/getting-started/example-datasets/recipes.md +++ b/docs/en/getting-started/example-datasets/recipes.md @@ -335,6 +335,6 @@ Result: ### Online Playground -The dataset is also available in the [Online Playground](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICBhcnJheUpvaW4oTkVSKSBBUyBrLAogICAgY291bnQoKSBBUyBjCkZST00gcmVjaXBlcwpHUk9VUCBCWSBrCk9SREVSIEJZIGMgREVTQwpMSU1JVCA1MA==). +The dataset is also available in the [Online Playground](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUCiAgICBhcnJheUpvaW4oTkVSKSBBUyBrLAogICAgY291bnQoKSBBUyBjCkZST00gcmVjaXBlcwpHUk9VUCBCWSBrCk9SREVSIEJZIGMgREVTQwpMSU1JVCA1MA==). -[Original article](https://clickhouse.tech/docs/en/getting-started/example-datasets/recipes/) +[Original article](https://clickhouse.com/docs/en/getting-started/example-datasets/recipes/) diff --git a/docs/en/getting-started/example-datasets/star-schema.md b/docs/en/getting-started/example-datasets/star-schema.md index 8a019e7ded3..14fa7cef654 100644 --- a/docs/en/getting-started/example-datasets/star-schema.md +++ b/docs/en/getting-started/example-datasets/star-schema.md @@ -365,4 +365,4 @@ ORDER BY P_BRAND ASC; ``` -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/star_schema/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/star_schema/) diff --git a/docs/en/getting-started/example-datasets/uk-price-paid.md b/docs/en/getting-started/example-datasets/uk-price-paid.md index 948ebd35b21..4b0ba25907d 100644 --- a/docs/en/getting-started/example-datasets/uk-price-paid.md +++ b/docs/en/getting-started/example-datasets/uk-price-paid.md @@ -3,27 +3,29 @@ toc_priority: 20 toc_title: UK Property Price Paid --- -# UK Property Price Paid +# UK Property Price Paid {#uk-property-price-paid} The dataset contains data about prices paid for real-estate property in England and Wales. The data is available since year 1995. -The size of the dataset in uncompressed form is about 4 GiB and it will take about 226 MiB in ClickHouse. +The size of the dataset in uncompressed form is about 4 GiB and it will take about 278 MiB in ClickHouse. Source: https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads Description of the fields: https://www.gov.uk/guidance/about-the-price-paid-data Contains HM Land Registry data © Crown copyright and database right 2021. This data is licensed under the Open Government Licence v3.0. -## Download the Dataset +## Download the Dataset {#download-dataset} -``` +Run the command: + +```bash wget http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv ``` Download will take about 2 minutes with good internet connection. -## Create the Table +## Create the Table {#create-table} -``` +```sql CREATE TABLE uk_price_paid ( price UInt32, @@ -44,7 +46,7 @@ CREATE TABLE uk_price_paid ) ENGINE = MergeTree ORDER BY (postcode1, postcode2, addr1, addr2); ``` -## Preprocess and Import Data +## Preprocess and Import Data {#preprocess-import-data} We will use `clickhouse-local` tool for data preprocessing and `clickhouse-client` to upload it. @@ -53,13 +55,13 @@ In this example, we define the structure of source data from the CSV file and sp The preprocessing is: - splitting the postcode to two different columns `postcode1` and `postcode2` that is better for storage and queries; - coverting the `time` field to date as it only contains 00:00 time; -- ignoring the `uuid` field because we don't need it for analysis; -- transforming `type` and `duration` to more readable Enum fields with function `transform`; -- transforming `is_new` and `category` fields from single-character string (`Y`/`N` and `A`/`B`) to UInt8 field with 0 and 1. +- ignoring the [UUid](../../sql-reference/data-types/uuid.md) field because we don't need it for analysis; +- transforming `type` and `duration` to more readable Enum fields with function [transform](../../sql-reference/functions/other-functions.md#transform); +- transforming `is_new` and `category` fields from single-character string (`Y`/`N` and `A`/`B`) to [UInt8](../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-uint256-int8-int16-int32-int64-int128-int256) field with 0 and 1. Preprocessed data is piped directly to `clickhouse-client` to be inserted into ClickHouse table in streaming fashion. -``` +```bash clickhouse-local --input-format CSV --structure ' uuid String, price UInt32, @@ -100,103 +102,131 @@ clickhouse-local --input-format CSV --structure ' It will take about 40 seconds. -## Validate the Data +## Validate the Data {#validate-data} -``` -SELECT count() FROM uk_price_paid -26248711 +Query: + +```sql +SELECT count() FROM uk_price_paid; ``` -The size of dataset in ClickHouse is just 226 MiB: +Result: -``` -SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'uk_price_paid' -226.40 MiB +```text +┌──count()─┐ +│ 26321785 │ +└──────────┘ ``` -## Run Some Queries +The size of dataset in ClickHouse is just 278 MiB, check it. -### Average price per year: +Query: +```sql +SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'uk_price_paid'; ``` -SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 1000000, 80) FROM uk_price_paid GROUP BY year ORDER BY year +Result: + +```text +┌─formatReadableSize(total_bytes)─┐ +│ 278.80 MiB │ +└─────────────────────────────────┘ +``` + +## Run Some Queries {#run-queries} + +### Query 1. Average Price Per Year {#average-price} + +Query: + +```sql +SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 1000000, 80) FROM uk_price_paid GROUP BY year ORDER BY year; +``` + +Result: + +```text ┌─year─┬──price─┬─bar(round(avg(price)), 0, 1000000, 80)─┐ │ 1995 │ 67932 │ █████▍ │ │ 1996 │ 71505 │ █████▋ │ │ 1997 │ 78532 │ ██████▎ │ -│ 1998 │ 85435 │ ██████▋ │ -│ 1999 │ 96036 │ ███████▋ │ -│ 2000 │ 107478 │ ████████▌ │ -│ 2001 │ 118886 │ █████████▌ │ -│ 2002 │ 137940 │ ███████████ │ -│ 2003 │ 155888 │ ████████████▍ │ +│ 1998 │ 85436 │ ██████▋ │ +│ 1999 │ 96037 │ ███████▋ │ +│ 2000 │ 107479 │ ████████▌ │ +│ 2001 │ 118885 │ █████████▌ │ +│ 2002 │ 137941 │ ███████████ │ +│ 2003 │ 155889 │ ████████████▍ │ │ 2004 │ 178885 │ ██████████████▎ │ -│ 2005 │ 189350 │ ███████████████▏ │ +│ 2005 │ 189351 │ ███████████████▏ │ │ 2006 │ 203528 │ ████████████████▎ │ -│ 2007 │ 219377 │ █████████████████▌ │ +│ 2007 │ 219378 │ █████████████████▌ │ │ 2008 │ 217056 │ █████████████████▎ │ │ 2009 │ 213419 │ █████████████████ │ -│ 2010 │ 236110 │ ██████████████████▊ │ -│ 2011 │ 232804 │ ██████████████████▌ │ -│ 2012 │ 238366 │ ███████████████████ │ +│ 2010 │ 236109 │ ██████████████████▊ │ +│ 2011 │ 232805 │ ██████████████████▌ │ +│ 2012 │ 238367 │ ███████████████████ │ │ 2013 │ 256931 │ ████████████████████▌ │ -│ 2014 │ 279917 │ ██████████████████████▍ │ -│ 2015 │ 297264 │ ███████████████████████▋ │ -│ 2016 │ 313197 │ █████████████████████████ │ -│ 2017 │ 346070 │ ███████████████████████████▋ │ -│ 2018 │ 350117 │ ████████████████████████████ │ -│ 2019 │ 351010 │ ████████████████████████████ │ -│ 2020 │ 368974 │ █████████████████████████████▌ │ -│ 2021 │ 384351 │ ██████████████████████████████▋ │ +│ 2014 │ 279915 │ ██████████████████████▍ │ +│ 2015 │ 297266 │ ███████████████████████▋ │ +│ 2016 │ 313201 │ █████████████████████████ │ +│ 2017 │ 346097 │ ███████████████████████████▋ │ +│ 2018 │ 350116 │ ████████████████████████████ │ +│ 2019 │ 351013 │ ████████████████████████████ │ +│ 2020 │ 369420 │ █████████████████████████████▌ │ +│ 2021 │ 386903 │ ██████████████████████████████▊ │ └──────┴────────┴────────────────────────────────────────┘ - -27 rows in set. Elapsed: 0.027 sec. Processed 26.25 million rows, 157.49 MB (955.96 million rows/s., 5.74 GB/s.) ``` -### Average price per year in London: +### Query 2. Average Price per Year in London {#average-price-london} +Query: + +```sql +SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 2000000, 100) FROM uk_price_paid WHERE town = 'LONDON' GROUP BY year ORDER BY year; ``` -SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 2000000, 100) FROM uk_price_paid WHERE town = 'LONDON' GROUP BY year ORDER BY year +Result: + +```text ┌─year─┬───price─┬─bar(round(avg(price)), 0, 2000000, 100)───────────────┐ -│ 1995 │ 109112 │ █████▍ │ +│ 1995 │ 109116 │ █████▍ │ │ 1996 │ 118667 │ █████▊ │ │ 1997 │ 136518 │ ██████▋ │ │ 1998 │ 152983 │ ███████▋ │ -│ 1999 │ 180633 │ █████████ │ -│ 2000 │ 215830 │ ██████████▋ │ -│ 2001 │ 232996 │ ███████████▋ │ -│ 2002 │ 263672 │ █████████████▏ │ +│ 1999 │ 180637 │ █████████ │ +│ 2000 │ 215838 │ ██████████▋ │ +│ 2001 │ 232994 │ ███████████▋ │ +│ 2002 │ 263670 │ █████████████▏ │ │ 2003 │ 278394 │ █████████████▊ │ -│ 2004 │ 304665 │ ███████████████▏ │ +│ 2004 │ 304666 │ ███████████████▏ │ │ 2005 │ 322875 │ ████████████████▏ │ -│ 2006 │ 356192 │ █████████████████▋ │ -│ 2007 │ 404055 │ ████████████████████▏ │ +│ 2006 │ 356191 │ █████████████████▋ │ +│ 2007 │ 404054 │ ████████████████████▏ │ │ 2008 │ 420741 │ █████████████████████ │ -│ 2009 │ 427754 │ █████████████████████▍ │ +│ 2009 │ 427753 │ █████████████████████▍ │ │ 2010 │ 480306 │ ████████████████████████ │ │ 2011 │ 496274 │ ████████████████████████▋ │ -│ 2012 │ 519441 │ █████████████████████████▊ │ -│ 2013 │ 616209 │ ██████████████████████████████▋ │ -│ 2014 │ 724144 │ ████████████████████████████████████▏ │ -│ 2015 │ 792112 │ ███████████████████████████████████████▌ │ -│ 2016 │ 843568 │ ██████████████████████████████████████████▏ │ -│ 2017 │ 982566 │ █████████████████████████████████████████████████▏ │ -│ 2018 │ 1016845 │ ██████████████████████████████████████████████████▋ │ -│ 2019 │ 1043277 │ ████████████████████████████████████████████████████▏ │ -│ 2020 │ 1003963 │ ██████████████████████████████████████████████████▏ │ -│ 2021 │ 940794 │ ███████████████████████████████████████████████ │ +│ 2012 │ 519442 │ █████████████████████████▊ │ +│ 2013 │ 616212 │ ██████████████████████████████▋ │ +│ 2014 │ 724154 │ ████████████████████████████████████▏ │ +│ 2015 │ 792129 │ ███████████████████████████████████████▌ │ +│ 2016 │ 843655 │ ██████████████████████████████████████████▏ │ +│ 2017 │ 982642 │ █████████████████████████████████████████████████▏ │ +│ 2018 │ 1016835 │ ██████████████████████████████████████████████████▋ │ +│ 2019 │ 1042849 │ ████████████████████████████████████████████████████▏ │ +│ 2020 │ 1011889 │ ██████████████████████████████████████████████████▌ │ +│ 2021 │ 960343 │ ████████████████████████████████████████████████ │ └──────┴─────────┴───────────────────────────────────────────────────────┘ - -27 rows in set. Elapsed: 0.024 sec. Processed 26.25 million rows, 76.88 MB (1.08 billion rows/s., 3.15 GB/s.) ``` Something happened in 2013. I don't have a clue. Maybe you have a clue what happened in 2020? -### The most expensive neighborhoods: +### Query 3. The Most Expensive Neighborhoods {#most-expensive-neighborhoods} -``` +Query: + +```sql SELECT town, district, @@ -210,127 +240,126 @@ GROUP BY district HAVING c >= 100 ORDER BY price DESC -LIMIT 100 +LIMIT 100; +``` + +Result: + +```text ┌─town─────────────────┬─district───────────────┬────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)────────────────────────────┐ -│ LONDON │ CITY OF WESTMINSTER │ 3372 │ 3305225 │ ██████████████████████████████████████████████████████████████████ │ -│ LONDON │ CITY OF LONDON │ 257 │ 3294478 │ █████████████████████████████████████████████████████████████████▊ │ -│ LONDON │ KENSINGTON AND CHELSEA │ 2367 │ 2342422 │ ██████████████████████████████████████████████▋ │ -│ LEATHERHEAD │ ELMBRIDGE │ 108 │ 1927143 │ ██████████████████████████████████████▌ │ -│ VIRGINIA WATER │ RUNNYMEDE │ 142 │ 1868819 │ █████████████████████████████████████▍ │ -│ LONDON │ CAMDEN │ 2815 │ 1736788 │ ██████████████████████████████████▋ │ -│ THORNTON HEATH │ CROYDON │ 521 │ 1733051 │ ██████████████████████████████████▋ │ -│ WINDLESHAM │ SURREY HEATH │ 103 │ 1717255 │ ██████████████████████████████████▎ │ -│ BARNET │ ENFIELD │ 115 │ 1503458 │ ██████████████████████████████ │ -│ OXFORD │ SOUTH OXFORDSHIRE │ 298 │ 1275200 │ █████████████████████████▌ │ -│ LONDON │ ISLINGTON │ 2458 │ 1274308 │ █████████████████████████▍ │ -│ COBHAM │ ELMBRIDGE │ 364 │ 1260005 │ █████████████████████████▏ │ -│ LONDON │ HOUNSLOW │ 618 │ 1215682 │ ████████████████████████▎ │ -│ ASCOT │ WINDSOR AND MAIDENHEAD │ 379 │ 1215146 │ ████████████████████████▎ │ -│ LONDON │ RICHMOND UPON THAMES │ 654 │ 1207551 │ ████████████████████████▏ │ -│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 307 │ 1186220 │ ███████████████████████▋ │ -│ RICHMOND │ RICHMOND UPON THAMES │ 805 │ 1100420 │ ██████████████████████ │ -│ LONDON │ HAMMERSMITH AND FULHAM │ 2888 │ 1062959 │ █████████████████████▎ │ -│ WEYBRIDGE │ ELMBRIDGE │ 607 │ 1027161 │ ████████████████████▌ │ -│ RADLETT │ HERTSMERE │ 265 │ 1015896 │ ████████████████████▎ │ -│ SALCOMBE │ SOUTH HAMS │ 124 │ 1014393 │ ████████████████████▎ │ -│ BURFORD │ WEST OXFORDSHIRE │ 102 │ 993100 │ ███████████████████▋ │ -│ ESHER │ ELMBRIDGE │ 454 │ 969770 │ ███████████████████▍ │ -│ HINDHEAD │ WAVERLEY │ 128 │ 967786 │ ███████████████████▎ │ -│ BROCKENHURST │ NEW FOREST │ 121 │ 967046 │ ███████████████████▎ │ -│ LEATHERHEAD │ GUILDFORD │ 191 │ 964489 │ ███████████████████▎ │ -│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 376 │ 958555 │ ███████████████████▏ │ -│ EAST MOLESEY │ ELMBRIDGE │ 181 │ 943457 │ ██████████████████▋ │ -│ OLNEY │ MILTON KEYNES │ 220 │ 942892 │ ██████████████████▋ │ -│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 135 │ 926950 │ ██████████████████▌ │ -│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 509 │ 905732 │ ██████████████████ │ -│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 889 │ 899689 │ █████████████████▊ │ -│ BELVEDERE │ BEXLEY │ 313 │ 895336 │ █████████████████▊ │ -│ CRANBROOK │ TUNBRIDGE WELLS │ 404 │ 888190 │ █████████████████▋ │ -│ LONDON │ EALING │ 2460 │ 865893 │ █████████████████▎ │ -│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 114 │ 863814 │ █████████████████▎ │ -│ LONDON │ MERTON │ 1958 │ 857192 │ █████████████████▏ │ -│ GUILDFORD │ WAVERLEY │ 131 │ 854447 │ █████████████████ │ -│ LONDON │ HACKNEY │ 3088 │ 846571 │ ████████████████▊ │ -│ LYMM │ WARRINGTON │ 285 │ 839920 │ ████████████████▋ │ -│ HARPENDEN │ ST ALBANS │ 606 │ 836994 │ ████████████████▋ │ -│ LONDON │ WANDSWORTH │ 6113 │ 832292 │ ████████████████▋ │ -│ LONDON │ SOUTHWARK │ 3612 │ 831319 │ ████████████████▋ │ -│ BERKHAMSTED │ DACORUM │ 502 │ 830356 │ ████████████████▌ │ -│ KINGS LANGLEY │ DACORUM │ 137 │ 821358 │ ████████████████▍ │ -│ TONBRIDGE │ TUNBRIDGE WELLS │ 339 │ 806736 │ ████████████████▏ │ -│ EPSOM │ REIGATE AND BANSTEAD │ 157 │ 805903 │ ████████████████ │ -│ WOKING │ GUILDFORD │ 161 │ 803283 │ ████████████████ │ -│ STOCKBRIDGE │ TEST VALLEY │ 168 │ 801973 │ ████████████████ │ -│ TEDDINGTON │ RICHMOND UPON THAMES │ 539 │ 798591 │ ███████████████▊ │ -│ OXFORD │ VALE OF WHITE HORSE │ 329 │ 792907 │ ███████████████▋ │ -│ LONDON │ BARNET │ 3624 │ 789583 │ ███████████████▋ │ -│ TWICKENHAM │ RICHMOND UPON THAMES │ 1090 │ 787760 │ ███████████████▋ │ -│ LUTON │ CENTRAL BEDFORDSHIRE │ 196 │ 786051 │ ███████████████▋ │ -│ TONBRIDGE │ MAIDSTONE │ 277 │ 785746 │ ███████████████▋ │ -│ TOWCESTER │ WEST NORTHAMPTONSHIRE │ 186 │ 783532 │ ███████████████▋ │ -│ LONDON │ LAMBETH │ 4832 │ 783422 │ ███████████████▋ │ -│ LUTTERWORTH │ HARBOROUGH │ 515 │ 781775 │ ███████████████▋ │ -│ WOODSTOCK │ WEST OXFORDSHIRE │ 135 │ 777499 │ ███████████████▌ │ -│ ALRESFORD │ WINCHESTER │ 196 │ 775577 │ ███████████████▌ │ -│ LONDON │ NEWHAM │ 2942 │ 768551 │ ███████████████▎ │ -│ ALDERLEY EDGE │ CHESHIRE EAST │ 168 │ 768280 │ ███████████████▎ │ -│ MARLOW │ BUCKINGHAMSHIRE │ 301 │ 762784 │ ███████████████▎ │ -│ BILLINGSHURST │ CHICHESTER │ 134 │ 760920 │ ███████████████▏ │ -│ LONDON │ TOWER HAMLETS │ 4183 │ 759635 │ ███████████████▏ │ -│ MIDHURST │ CHICHESTER │ 245 │ 759101 │ ███████████████▏ │ -│ THAMES DITTON │ ELMBRIDGE │ 227 │ 753347 │ ███████████████ │ -│ POTTERS BAR │ WELWYN HATFIELD │ 163 │ 752926 │ ███████████████ │ -│ REIGATE │ REIGATE AND BANSTEAD │ 555 │ 740961 │ ██████████████▋ │ -│ TADWORTH │ REIGATE AND BANSTEAD │ 477 │ 738997 │ ██████████████▋ │ -│ SEVENOAKS │ SEVENOAKS │ 1074 │ 734658 │ ██████████████▋ │ -│ PETWORTH │ CHICHESTER │ 138 │ 732432 │ ██████████████▋ │ -│ BOURNE END │ BUCKINGHAMSHIRE │ 127 │ 730742 │ ██████████████▌ │ -│ PURLEY │ CROYDON │ 540 │ 727721 │ ██████████████▌ │ -│ OXTED │ TANDRIDGE │ 320 │ 726078 │ ██████████████▌ │ -│ LONDON │ HARINGEY │ 2988 │ 724573 │ ██████████████▍ │ -│ BANSTEAD │ REIGATE AND BANSTEAD │ 373 │ 713834 │ ██████████████▎ │ -│ PINNER │ HARROW │ 480 │ 712166 │ ██████████████▏ │ -│ MALMESBURY │ WILTSHIRE │ 293 │ 707747 │ ██████████████▏ │ -│ RICKMANSWORTH │ THREE RIVERS │ 732 │ 705400 │ ██████████████ │ -│ SLOUGH │ BUCKINGHAMSHIRE │ 359 │ 705002 │ ██████████████ │ -│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 214 │ 704904 │ ██████████████ │ -│ READING │ SOUTH OXFORDSHIRE │ 295 │ 701697 │ ██████████████ │ -│ HYTHE │ FOLKESTONE AND HYTHE │ 457 │ 700334 │ ██████████████ │ -│ WELWYN │ WELWYN HATFIELD │ 217 │ 699649 │ █████████████▊ │ -│ CHIGWELL │ EPPING FOREST │ 242 │ 697869 │ █████████████▊ │ -│ BARNET │ BARNET │ 906 │ 695680 │ █████████████▊ │ -│ HASLEMERE │ CHICHESTER │ 120 │ 694028 │ █████████████▊ │ -│ LEATHERHEAD │ MOLE VALLEY │ 748 │ 692026 │ █████████████▋ │ -│ LONDON │ BRENT │ 1945 │ 690799 │ █████████████▋ │ -│ HASLEMERE │ WAVERLEY │ 258 │ 690765 │ █████████████▋ │ -│ NORTHWOOD │ HILLINGDON │ 252 │ 690753 │ █████████████▋ │ -│ WALTON-ON-THAMES │ ELMBRIDGE │ 871 │ 689431 │ █████████████▋ │ -│ INGATESTONE │ BRENTWOOD │ 150 │ 688345 │ █████████████▋ │ -│ OXFORD │ OXFORD │ 1761 │ 686114 │ █████████████▋ │ -│ CHISLEHURST │ BROMLEY │ 410 │ 682892 │ █████████████▋ │ -│ KINGS LANGLEY │ THREE RIVERS │ 109 │ 682320 │ █████████████▋ │ -│ ASHTEAD │ MOLE VALLEY │ 280 │ 680483 │ █████████████▌ │ -│ WOKING │ SURREY HEATH │ 269 │ 679035 │ █████████████▌ │ -│ ASCOT │ BRACKNELL FOREST │ 160 │ 678632 │ █████████████▌ │ +│ LONDON │ CITY OF WESTMINSTER │ 3606 │ 3280239 │ █████████████████████████████████████████████████████████████████▌ │ +│ LONDON │ CITY OF LONDON │ 274 │ 3160502 │ ███████████████████████████████████████████████████████████████▏ │ +│ LONDON │ KENSINGTON AND CHELSEA │ 2550 │ 2308478 │ ██████████████████████████████████████████████▏ │ +│ LEATHERHEAD │ ELMBRIDGE │ 114 │ 1897407 │ █████████████████████████████████████▊ │ +│ LONDON │ CAMDEN │ 3033 │ 1805404 │ ████████████████████████████████████ │ +│ VIRGINIA WATER │ RUNNYMEDE │ 156 │ 1753247 │ ███████████████████████████████████ │ +│ WINDLESHAM │ SURREY HEATH │ 108 │ 1677613 │ █████████████████████████████████▌ │ +│ THORNTON HEATH │ CROYDON │ 546 │ 1671721 │ █████████████████████████████████▍ │ +│ BARNET │ ENFIELD │ 124 │ 1505840 │ ██████████████████████████████ │ +│ COBHAM │ ELMBRIDGE │ 387 │ 1237250 │ ████████████████████████▋ │ +│ LONDON │ ISLINGTON │ 2668 │ 1236980 │ ████████████████████████▋ │ +│ OXFORD │ SOUTH OXFORDSHIRE │ 321 │ 1220907 │ ████████████████████████▍ │ +│ LONDON │ RICHMOND UPON THAMES │ 704 │ 1215551 │ ████████████████████████▎ │ +│ LONDON │ HOUNSLOW │ 671 │ 1207493 │ ████████████████████████▏ │ +│ ASCOT │ WINDSOR AND MAIDENHEAD │ 407 │ 1183299 │ ███████████████████████▋ │ +│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 330 │ 1175615 │ ███████████████████████▌ │ +│ RICHMOND │ RICHMOND UPON THAMES │ 874 │ 1110444 │ ██████████████████████▏ │ +│ LONDON │ HAMMERSMITH AND FULHAM │ 3086 │ 1053983 │ █████████████████████ │ +│ SURBITON │ ELMBRIDGE │ 100 │ 1011800 │ ████████████████████▏ │ +│ RADLETT │ HERTSMERE │ 283 │ 1011712 │ ████████████████████▏ │ +│ SALCOMBE │ SOUTH HAMS │ 127 │ 1011624 │ ████████████████████▏ │ +│ WEYBRIDGE │ ELMBRIDGE │ 655 │ 1007265 │ ████████████████████▏ │ +│ ESHER │ ELMBRIDGE │ 485 │ 986581 │ ███████████████████▋ │ +│ LEATHERHEAD │ GUILDFORD │ 202 │ 977320 │ ███████████████████▌ │ +│ BURFORD │ WEST OXFORDSHIRE │ 111 │ 966893 │ ███████████████████▎ │ +│ BROCKENHURST │ NEW FOREST │ 129 │ 956675 │ ███████████████████▏ │ +│ HINDHEAD │ WAVERLEY │ 137 │ 953753 │ ███████████████████ │ +│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 419 │ 951121 │ ███████████████████ │ +│ EAST MOLESEY │ ELMBRIDGE │ 192 │ 936769 │ ██████████████████▋ │ +│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 146 │ 925515 │ ██████████████████▌ │ +│ LONDON │ TOWER HAMLETS │ 4388 │ 918304 │ ██████████████████▎ │ +│ OLNEY │ MILTON KEYNES │ 235 │ 910646 │ ██████████████████▏ │ +│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 540 │ 902418 │ ██████████████████ │ +│ LONDON │ SOUTHWARK │ 3885 │ 892997 │ █████████████████▋ │ +│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 960 │ 885969 │ █████████████████▋ │ +│ LONDON │ EALING │ 2658 │ 871755 │ █████████████████▍ │ +│ CRANBROOK │ TUNBRIDGE WELLS │ 431 │ 862348 │ █████████████████▏ │ +│ LONDON │ MERTON │ 2099 │ 859118 │ █████████████████▏ │ +│ BELVEDERE │ BEXLEY │ 346 │ 842423 │ ████████████████▋ │ +│ GUILDFORD │ WAVERLEY │ 143 │ 841277 │ ████████████████▋ │ +│ HARPENDEN │ ST ALBANS │ 657 │ 841216 │ ████████████████▋ │ +│ LONDON │ HACKNEY │ 3307 │ 837090 │ ████████████████▋ │ +│ LONDON │ WANDSWORTH │ 6566 │ 832663 │ ████████████████▋ │ +│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 123 │ 824299 │ ████████████████▍ │ +│ KINGS LANGLEY │ DACORUM │ 145 │ 821331 │ ████████████████▍ │ +│ BERKHAMSTED │ DACORUM │ 543 │ 818415 │ ████████████████▎ │ +│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 226 │ 802807 │ ████████████████ │ +│ BILLINGSHURST │ CHICHESTER │ 144 │ 797829 │ ███████████████▊ │ +│ WOKING │ GUILDFORD │ 176 │ 793494 │ ███████████████▋ │ +│ STOCKBRIDGE │ TEST VALLEY │ 178 │ 793269 │ ███████████████▋ │ +│ EPSOM │ REIGATE AND BANSTEAD │ 172 │ 791862 │ ███████████████▋ │ +│ TONBRIDGE │ TUNBRIDGE WELLS │ 360 │ 787876 │ ███████████████▋ │ +│ TEDDINGTON │ RICHMOND UPON THAMES │ 595 │ 786492 │ ███████████████▋ │ +│ TWICKENHAM │ RICHMOND UPON THAMES │ 1155 │ 786193 │ ███████████████▋ │ +│ LYNDHURST │ NEW FOREST │ 102 │ 785593 │ ███████████████▋ │ +│ LONDON │ LAMBETH │ 5228 │ 774574 │ ███████████████▍ │ +│ LONDON │ BARNET │ 3955 │ 773259 │ ███████████████▍ │ +│ OXFORD │ VALE OF WHITE HORSE │ 353 │ 772088 │ ███████████████▍ │ +│ TONBRIDGE │ MAIDSTONE │ 305 │ 770740 │ ███████████████▍ │ +│ LUTTERWORTH │ HARBOROUGH │ 538 │ 768634 │ ███████████████▎ │ +│ WOODSTOCK │ WEST OXFORDSHIRE │ 140 │ 766037 │ ███████████████▎ │ +│ MIDHURST │ CHICHESTER │ 257 │ 764815 │ ███████████████▎ │ +│ MARLOW │ BUCKINGHAMSHIRE │ 327 │ 761876 │ ███████████████▏ │ +│ LONDON │ NEWHAM │ 3237 │ 761784 │ ███████████████▏ │ +│ ALDERLEY EDGE │ CHESHIRE EAST │ 178 │ 757318 │ ███████████████▏ │ +│ LUTON │ CENTRAL BEDFORDSHIRE │ 212 │ 754283 │ ███████████████ │ +│ PETWORTH │ CHICHESTER │ 154 │ 754220 │ ███████████████ │ +│ ALRESFORD │ WINCHESTER │ 219 │ 752718 │ ███████████████ │ +│ POTTERS BAR │ WELWYN HATFIELD │ 174 │ 748465 │ ██████████████▊ │ +│ HASLEMERE │ CHICHESTER │ 128 │ 746907 │ ██████████████▊ │ +│ TADWORTH │ REIGATE AND BANSTEAD │ 502 │ 743252 │ ██████████████▋ │ +│ THAMES DITTON │ ELMBRIDGE │ 244 │ 741913 │ ██████████████▋ │ +│ REIGATE │ REIGATE AND BANSTEAD │ 581 │ 738198 │ ██████████████▋ │ +│ BOURNE END │ BUCKINGHAMSHIRE │ 138 │ 735190 │ ██████████████▋ │ +│ SEVENOAKS │ SEVENOAKS │ 1156 │ 730018 │ ██████████████▌ │ +│ OXTED │ TANDRIDGE │ 336 │ 729123 │ ██████████████▌ │ +│ INGATESTONE │ BRENTWOOD │ 166 │ 728103 │ ██████████████▌ │ +│ LONDON │ BRENT │ 2079 │ 720605 │ ██████████████▍ │ +│ LONDON │ HARINGEY │ 3216 │ 717780 │ ██████████████▎ │ +│ PURLEY │ CROYDON │ 575 │ 716108 │ ██████████████▎ │ +│ WELWYN │ WELWYN HATFIELD │ 222 │ 710603 │ ██████████████▏ │ +│ RICKMANSWORTH │ THREE RIVERS │ 798 │ 704571 │ ██████████████ │ +│ BANSTEAD │ REIGATE AND BANSTEAD │ 401 │ 701293 │ ██████████████ │ +│ CHIGWELL │ EPPING FOREST │ 261 │ 701203 │ ██████████████ │ +│ PINNER │ HARROW │ 528 │ 698885 │ █████████████▊ │ +│ HASLEMERE │ WAVERLEY │ 280 │ 696659 │ █████████████▊ │ +│ SLOUGH │ BUCKINGHAMSHIRE │ 396 │ 694917 │ █████████████▊ │ +│ WALTON-ON-THAMES │ ELMBRIDGE │ 946 │ 692395 │ █████████████▋ │ +│ READING │ SOUTH OXFORDSHIRE │ 318 │ 691988 │ █████████████▋ │ +│ NORTHWOOD │ HILLINGDON │ 271 │ 690643 │ █████████████▋ │ +│ FELTHAM │ HOUNSLOW │ 763 │ 688595 │ █████████████▋ │ +│ ASHTEAD │ MOLE VALLEY │ 303 │ 687923 │ █████████████▋ │ +│ BARNET │ BARNET │ 975 │ 686980 │ █████████████▋ │ +│ WOKING │ SURREY HEATH │ 283 │ 686669 │ █████████████▋ │ +│ MALMESBURY │ WILTSHIRE │ 323 │ 683324 │ █████████████▋ │ +│ AMERSHAM │ BUCKINGHAMSHIRE │ 496 │ 680962 │ █████████████▌ │ +│ CHISLEHURST │ BROMLEY │ 430 │ 680209 │ █████████████▌ │ +│ HYTHE │ FOLKESTONE AND HYTHE │ 490 │ 676908 │ █████████████▌ │ +│ MAYFIELD │ WEALDEN │ 101 │ 676210 │ █████████████▌ │ +│ ASCOT │ BRACKNELL FOREST │ 168 │ 676004 │ █████████████▌ │ └──────────────────────┴────────────────────────┴──────┴─────────┴────────────────────────────────────────────────────────────────────┘ - -100 rows in set. Elapsed: 0.039 sec. Processed 26.25 million rows, 278.03 MB (674.32 million rows/s., 7.14 GB/s.) ``` -### Test it in Playground +## Let's Speed Up Queries Using Projections {#speedup-with-projections} -The data is uploaded to ClickHouse Playground, [example](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIHRvd24sIGRpc3RyaWN0LCBjb3VudCgpIEFTIGMsIHJvdW5kKGF2ZyhwcmljZSkpIEFTIHByaWNlLCBiYXIocHJpY2UsIDAsIDUwMDAwMDAsIDEwMCkgRlJPTSB1a19wcmljZV9wYWlkIFdIRVJFIGRhdGUgPj0gJzIwMjAtMDEtMDEnIEdST1VQIEJZIHRvd24sIGRpc3RyaWN0IEhBVklORyBjID49IDEwMCBPUkRFUiBCWSBwcmljZSBERVNDIExJTUlUIDEwMA==). +[Projections](../../sql-reference/statements/alter/projection.md) allow to improve queries speed by storing pre-aggregated data. -## Let's speed up queries using projections +### Build a Projection {#build-projection} -[Projections](https://../../sql-reference/statements/alter/projection/) allow to improve queries speed by storing pre-aggregated data. - -### Build a projection - -``` --- create an aggregate projection by dimensions (toYear(date), district, town) +Create an aggregate projection by dimensions `toYear(date)`, `district`, `town`: +```sql ALTER TABLE uk_price_paid ADD PROJECTION projection_by_year_district_town ( @@ -346,25 +375,31 @@ ALTER TABLE uk_price_paid district, town ); +``` --- populate the projection for existing data (without it projection will be --- created for only newly inserted data) +Populate the projection for existing data (without it projection will be created for only newly inserted data): +```sql ALTER TABLE uk_price_paid MATERIALIZE PROJECTION projection_by_year_district_town SETTINGS mutations_sync = 1; ``` -## Test performance +## Test Performance {#test-performance} Let's run the same 3 queries. +[Enable](../../operations/settings/settings.md#allow-experimental-projection-optimization) projections for selects: + +```sql +SET allow_experimental_projection_optimization = 1; ``` --- enable projections for selects -set allow_experimental_projection_optimization=1; --- Q1) Average price per year: +### Query 1. Average Price Per Year {#average-price-projections} +Query: + +```sql SELECT toYear(date) AS year, round(avg(price)) AS price, @@ -372,41 +407,47 @@ SELECT FROM uk_price_paid GROUP BY year ORDER BY year ASC; +``` +Result: + +```text ┌─year─┬──price─┬─bar(round(avg(price)), 0, 1000000, 80)─┐ │ 1995 │ 67932 │ █████▍ │ │ 1996 │ 71505 │ █████▋ │ │ 1997 │ 78532 │ ██████▎ │ -│ 1998 │ 85435 │ ██████▋ │ -│ 1999 │ 96036 │ ███████▋ │ -│ 2000 │ 107478 │ ████████▌ │ -│ 2001 │ 118886 │ █████████▌ │ -│ 2002 │ 137940 │ ███████████ │ -│ 2003 │ 155888 │ ████████████▍ │ +│ 1998 │ 85436 │ ██████▋ │ +│ 1999 │ 96037 │ ███████▋ │ +│ 2000 │ 107479 │ ████████▌ │ +│ 2001 │ 118885 │ █████████▌ │ +│ 2002 │ 137941 │ ███████████ │ +│ 2003 │ 155889 │ ████████████▍ │ │ 2004 │ 178885 │ ██████████████▎ │ -│ 2005 │ 189350 │ ███████████████▏ │ +│ 2005 │ 189351 │ ███████████████▏ │ │ 2006 │ 203528 │ ████████████████▎ │ -│ 2007 │ 219377 │ █████████████████▌ │ +│ 2007 │ 219378 │ █████████████████▌ │ │ 2008 │ 217056 │ █████████████████▎ │ │ 2009 │ 213419 │ █████████████████ │ -│ 2010 │ 236110 │ ██████████████████▊ │ -│ 2011 │ 232804 │ ██████████████████▌ │ -│ 2012 │ 238366 │ ███████████████████ │ +│ 2010 │ 236109 │ ██████████████████▊ │ +│ 2011 │ 232805 │ ██████████████████▌ │ +│ 2012 │ 238367 │ ███████████████████ │ │ 2013 │ 256931 │ ████████████████████▌ │ -│ 2014 │ 279917 │ ██████████████████████▍ │ -│ 2015 │ 297264 │ ███████████████████████▋ │ -│ 2016 │ 313197 │ █████████████████████████ │ -│ 2017 │ 346070 │ ███████████████████████████▋ │ -│ 2018 │ 350117 │ ████████████████████████████ │ -│ 2019 │ 351010 │ ████████████████████████████ │ -│ 2020 │ 368974 │ █████████████████████████████▌ │ -│ 2021 │ 384351 │ ██████████████████████████████▋ │ +│ 2014 │ 279915 │ ██████████████████████▍ │ +│ 2015 │ 297266 │ ███████████████████████▋ │ +│ 2016 │ 313201 │ █████████████████████████ │ +│ 2017 │ 346097 │ ███████████████████████████▋ │ +│ 2018 │ 350116 │ ████████████████████████████ │ +│ 2019 │ 351013 │ ████████████████████████████ │ +│ 2020 │ 369420 │ █████████████████████████████▌ │ +│ 2021 │ 386903 │ ██████████████████████████████▊ │ └──────┴────────┴────────────────────────────────────────┘ +``` -27 rows in set. Elapsed: 0.003 sec. Processed 106.87 thousand rows, 3.21 MB (31.92 million rows/s., 959.03 MB/s.) +### Query 2. Average Price Per Year in London {#average-price-london-projections} --- Q2) Average price per year in London: +Query: +```sql SELECT toYear(date) AS year, round(avg(price)) AS price, @@ -415,42 +456,49 @@ FROM uk_price_paid WHERE town = 'LONDON' GROUP BY year ORDER BY year ASC; +``` +Result: + +```text ┌─year─┬───price─┬─bar(round(avg(price)), 0, 2000000, 100)───────────────┐ -│ 1995 │ 109112 │ █████▍ │ +│ 1995 │ 109116 │ █████▍ │ │ 1996 │ 118667 │ █████▊ │ │ 1997 │ 136518 │ ██████▋ │ │ 1998 │ 152983 │ ███████▋ │ -│ 1999 │ 180633 │ █████████ │ -│ 2000 │ 215830 │ ██████████▋ │ -│ 2001 │ 232996 │ ███████████▋ │ -│ 2002 │ 263672 │ █████████████▏ │ +│ 1999 │ 180637 │ █████████ │ +│ 2000 │ 215838 │ ██████████▋ │ +│ 2001 │ 232994 │ ███████████▋ │ +│ 2002 │ 263670 │ █████████████▏ │ │ 2003 │ 278394 │ █████████████▊ │ -│ 2004 │ 304665 │ ███████████████▏ │ +│ 2004 │ 304666 │ ███████████████▏ │ │ 2005 │ 322875 │ ████████████████▏ │ -│ 2006 │ 356192 │ █████████████████▋ │ -│ 2007 │ 404055 │ ████████████████████▏ │ +│ 2006 │ 356191 │ █████████████████▋ │ +│ 2007 │ 404054 │ ████████████████████▏ │ │ 2008 │ 420741 │ █████████████████████ │ -│ 2009 │ 427754 │ █████████████████████▍ │ +│ 2009 │ 427753 │ █████████████████████▍ │ │ 2010 │ 480306 │ ████████████████████████ │ │ 2011 │ 496274 │ ████████████████████████▋ │ -│ 2012 │ 519441 │ █████████████████████████▊ │ -│ 2013 │ 616209 │ ██████████████████████████████▋ │ -│ 2014 │ 724144 │ ████████████████████████████████████▏ │ -│ 2015 │ 792112 │ ███████████████████████████████████████▌ │ -│ 2016 │ 843568 │ ██████████████████████████████████████████▏ │ -│ 2017 │ 982566 │ █████████████████████████████████████████████████▏ │ -│ 2018 │ 1016845 │ ██████████████████████████████████████████████████▋ │ -│ 2019 │ 1043277 │ ████████████████████████████████████████████████████▏ │ -│ 2020 │ 1003963 │ ██████████████████████████████████████████████████▏ │ -│ 2021 │ 940794 │ ███████████████████████████████████████████████ │ +│ 2012 │ 519442 │ █████████████████████████▊ │ +│ 2013 │ 616212 │ ██████████████████████████████▋ │ +│ 2014 │ 724154 │ ████████████████████████████████████▏ │ +│ 2015 │ 792129 │ ███████████████████████████████████████▌ │ +│ 2016 │ 843655 │ ██████████████████████████████████████████▏ │ +│ 2017 │ 982642 │ █████████████████████████████████████████████████▏ │ +│ 2018 │ 1016835 │ ██████████████████████████████████████████████████▋ │ +│ 2019 │ 1042849 │ ████████████████████████████████████████████████████▏ │ +│ 2020 │ 1011889 │ ██████████████████████████████████████████████████▌ │ +│ 2021 │ 960343 │ ████████████████████████████████████████████████ │ └──────┴─────────┴───────────────────────────────────────────────────────┘ +``` -27 rows in set. Elapsed: 0.005 sec. Processed 106.87 thousand rows, 3.53 MB (23.49 million rows/s., 775.95 MB/s.) +### Query 3. The Most Expensive Neighborhoods {#most-expensive-neighborhoods-projections} --- Q3) The most expensive neighborhoods: --- the condition (date >= '2020-01-01') needs to be modified to match projection dimension (toYear(date) >= 2020) +The condition (date >= '2020-01-01') needs to be modified to match projection dimension (toYear(date) >= 2020). +Query: + +```sql SELECT town, district, @@ -464,118 +512,138 @@ GROUP BY district HAVING c >= 100 ORDER BY price DESC -LIMIT 100 - -┌─town─────────────────┬─district───────────────┬────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)────────────────────────────┐ -│ LONDON │ CITY OF WESTMINSTER │ 3372 │ 3305225 │ ██████████████████████████████████████████████████████████████████ │ -│ LONDON │ CITY OF LONDON │ 257 │ 3294478 │ █████████████████████████████████████████████████████████████████▊ │ -│ LONDON │ KENSINGTON AND CHELSEA │ 2367 │ 2342422 │ ██████████████████████████████████████████████▋ │ -│ LEATHERHEAD │ ELMBRIDGE │ 108 │ 1927143 │ ██████████████████████████████████████▌ │ -│ VIRGINIA WATER │ RUNNYMEDE │ 142 │ 1868819 │ █████████████████████████████████████▍ │ -│ LONDON │ CAMDEN │ 2815 │ 1736788 │ ██████████████████████████████████▋ │ -│ THORNTON HEATH │ CROYDON │ 521 │ 1733051 │ ██████████████████████████████████▋ │ -│ WINDLESHAM │ SURREY HEATH │ 103 │ 1717255 │ ██████████████████████████████████▎ │ -│ BARNET │ ENFIELD │ 115 │ 1503458 │ ██████████████████████████████ │ -│ OXFORD │ SOUTH OXFORDSHIRE │ 298 │ 1275200 │ █████████████████████████▌ │ -│ LONDON │ ISLINGTON │ 2458 │ 1274308 │ █████████████████████████▍ │ -│ COBHAM │ ELMBRIDGE │ 364 │ 1260005 │ █████████████████████████▏ │ -│ LONDON │ HOUNSLOW │ 618 │ 1215682 │ ████████████████████████▎ │ -│ ASCOT │ WINDSOR AND MAIDENHEAD │ 379 │ 1215146 │ ████████████████████████▎ │ -│ LONDON │ RICHMOND UPON THAMES │ 654 │ 1207551 │ ████████████████████████▏ │ -│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 307 │ 1186220 │ ███████████████████████▋ │ -│ RICHMOND │ RICHMOND UPON THAMES │ 805 │ 1100420 │ ██████████████████████ │ -│ LONDON │ HAMMERSMITH AND FULHAM │ 2888 │ 1062959 │ █████████████████████▎ │ -│ WEYBRIDGE │ ELMBRIDGE │ 607 │ 1027161 │ ████████████████████▌ │ -│ RADLETT │ HERTSMERE │ 265 │ 1015896 │ ████████████████████▎ │ -│ SALCOMBE │ SOUTH HAMS │ 124 │ 1014393 │ ████████████████████▎ │ -│ BURFORD │ WEST OXFORDSHIRE │ 102 │ 993100 │ ███████████████████▋ │ -│ ESHER │ ELMBRIDGE │ 454 │ 969770 │ ███████████████████▍ │ -│ HINDHEAD │ WAVERLEY │ 128 │ 967786 │ ███████████████████▎ │ -│ BROCKENHURST │ NEW FOREST │ 121 │ 967046 │ ███████████████████▎ │ -│ LEATHERHEAD │ GUILDFORD │ 191 │ 964489 │ ███████████████████▎ │ -│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 376 │ 958555 │ ███████████████████▏ │ -│ EAST MOLESEY │ ELMBRIDGE │ 181 │ 943457 │ ██████████████████▋ │ -│ OLNEY │ MILTON KEYNES │ 220 │ 942892 │ ██████████████████▋ │ -│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 135 │ 926950 │ ██████████████████▌ │ -│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 509 │ 905732 │ ██████████████████ │ -│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 889 │ 899689 │ █████████████████▊ │ -│ BELVEDERE │ BEXLEY │ 313 │ 895336 │ █████████████████▊ │ -│ CRANBROOK │ TUNBRIDGE WELLS │ 404 │ 888190 │ █████████████████▋ │ -│ LONDON │ EALING │ 2460 │ 865893 │ █████████████████▎ │ -│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 114 │ 863814 │ █████████████████▎ │ -│ LONDON │ MERTON │ 1958 │ 857192 │ █████████████████▏ │ -│ GUILDFORD │ WAVERLEY │ 131 │ 854447 │ █████████████████ │ -│ LONDON │ HACKNEY │ 3088 │ 846571 │ ████████████████▊ │ -│ LYMM │ WARRINGTON │ 285 │ 839920 │ ████████████████▋ │ -│ HARPENDEN │ ST ALBANS │ 606 │ 836994 │ ████████████████▋ │ -│ LONDON │ WANDSWORTH │ 6113 │ 832292 │ ████████████████▋ │ -│ LONDON │ SOUTHWARK │ 3612 │ 831319 │ ████████████████▋ │ -│ BERKHAMSTED │ DACORUM │ 502 │ 830356 │ ████████████████▌ │ -│ KINGS LANGLEY │ DACORUM │ 137 │ 821358 │ ████████████████▍ │ -│ TONBRIDGE │ TUNBRIDGE WELLS │ 339 │ 806736 │ ████████████████▏ │ -│ EPSOM │ REIGATE AND BANSTEAD │ 157 │ 805903 │ ████████████████ │ -│ WOKING │ GUILDFORD │ 161 │ 803283 │ ████████████████ │ -│ STOCKBRIDGE │ TEST VALLEY │ 168 │ 801973 │ ████████████████ │ -│ TEDDINGTON │ RICHMOND UPON THAMES │ 539 │ 798591 │ ███████████████▊ │ -│ OXFORD │ VALE OF WHITE HORSE │ 329 │ 792907 │ ███████████████▋ │ -│ LONDON │ BARNET │ 3624 │ 789583 │ ███████████████▋ │ -│ TWICKENHAM │ RICHMOND UPON THAMES │ 1090 │ 787760 │ ███████████████▋ │ -│ LUTON │ CENTRAL BEDFORDSHIRE │ 196 │ 786051 │ ███████████████▋ │ -│ TONBRIDGE │ MAIDSTONE │ 277 │ 785746 │ ███████████████▋ │ -│ TOWCESTER │ WEST NORTHAMPTONSHIRE │ 186 │ 783532 │ ███████████████▋ │ -│ LONDON │ LAMBETH │ 4832 │ 783422 │ ███████████████▋ │ -│ LUTTERWORTH │ HARBOROUGH │ 515 │ 781775 │ ███████████████▋ │ -│ WOODSTOCK │ WEST OXFORDSHIRE │ 135 │ 777499 │ ███████████████▌ │ -│ ALRESFORD │ WINCHESTER │ 196 │ 775577 │ ███████████████▌ │ -│ LONDON │ NEWHAM │ 2942 │ 768551 │ ███████████████▎ │ -│ ALDERLEY EDGE │ CHESHIRE EAST │ 168 │ 768280 │ ███████████████▎ │ -│ MARLOW │ BUCKINGHAMSHIRE │ 301 │ 762784 │ ███████████████▎ │ -│ BILLINGSHURST │ CHICHESTER │ 134 │ 760920 │ ███████████████▏ │ -│ LONDON │ TOWER HAMLETS │ 4183 │ 759635 │ ███████████████▏ │ -│ MIDHURST │ CHICHESTER │ 245 │ 759101 │ ███████████████▏ │ -│ THAMES DITTON │ ELMBRIDGE │ 227 │ 753347 │ ███████████████ │ -│ POTTERS BAR │ WELWYN HATFIELD │ 163 │ 752926 │ ███████████████ │ -│ REIGATE │ REIGATE AND BANSTEAD │ 555 │ 740961 │ ██████████████▋ │ -│ TADWORTH │ REIGATE AND BANSTEAD │ 477 │ 738997 │ ██████████████▋ │ -│ SEVENOAKS │ SEVENOAKS │ 1074 │ 734658 │ ██████████████▋ │ -│ PETWORTH │ CHICHESTER │ 138 │ 732432 │ ██████████████▋ │ -│ BOURNE END │ BUCKINGHAMSHIRE │ 127 │ 730742 │ ██████████████▌ │ -│ PURLEY │ CROYDON │ 540 │ 727721 │ ██████████████▌ │ -│ OXTED │ TANDRIDGE │ 320 │ 726078 │ ██████████████▌ │ -│ LONDON │ HARINGEY │ 2988 │ 724573 │ ██████████████▍ │ -│ BANSTEAD │ REIGATE AND BANSTEAD │ 373 │ 713834 │ ██████████████▎ │ -│ PINNER │ HARROW │ 480 │ 712166 │ ██████████████▏ │ -│ MALMESBURY │ WILTSHIRE │ 293 │ 707747 │ ██████████████▏ │ -│ RICKMANSWORTH │ THREE RIVERS │ 732 │ 705400 │ ██████████████ │ -│ SLOUGH │ BUCKINGHAMSHIRE │ 359 │ 705002 │ ██████████████ │ -│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 214 │ 704904 │ ██████████████ │ -│ READING │ SOUTH OXFORDSHIRE │ 295 │ 701697 │ ██████████████ │ -│ HYTHE │ FOLKESTONE AND HYTHE │ 457 │ 700334 │ ██████████████ │ -│ WELWYN │ WELWYN HATFIELD │ 217 │ 699649 │ █████████████▊ │ -│ CHIGWELL │ EPPING FOREST │ 242 │ 697869 │ █████████████▊ │ -│ BARNET │ BARNET │ 906 │ 695680 │ █████████████▊ │ -│ HASLEMERE │ CHICHESTER │ 120 │ 694028 │ █████████████▊ │ -│ LEATHERHEAD │ MOLE VALLEY │ 748 │ 692026 │ █████████████▋ │ -│ LONDON │ BRENT │ 1945 │ 690799 │ █████████████▋ │ -│ HASLEMERE │ WAVERLEY │ 258 │ 690765 │ █████████████▋ │ -│ NORTHWOOD │ HILLINGDON │ 252 │ 690753 │ █████████████▋ │ -│ WALTON-ON-THAMES │ ELMBRIDGE │ 871 │ 689431 │ █████████████▋ │ -│ INGATESTONE │ BRENTWOOD │ 150 │ 688345 │ █████████████▋ │ -│ OXFORD │ OXFORD │ 1761 │ 686114 │ █████████████▋ │ -│ CHISLEHURST │ BROMLEY │ 410 │ 682892 │ █████████████▋ │ -│ KINGS LANGLEY │ THREE RIVERS │ 109 │ 682320 │ █████████████▋ │ -│ ASHTEAD │ MOLE VALLEY │ 280 │ 680483 │ █████████████▌ │ -│ WOKING │ SURREY HEATH │ 269 │ 679035 │ █████████████▌ │ -│ ASCOT │ BRACKNELL FOREST │ 160 │ 678632 │ █████████████▌ │ -└──────────────────────┴────────────────────────┴──────┴─────────┴────────────────────────────────────────────────────────────────────┘ - -100 rows in set. Elapsed: 0.005 sec. Processed 12.85 thousand rows, 813.40 KB (2.73 million rows/s., 172.95 MB/s.) +LIMIT 100; ``` +Result: + +```text +┌─town─────────────────┬─district───────────────┬────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)────────────────────────────┐ +│ LONDON │ CITY OF WESTMINSTER │ 3606 │ 3280239 │ █████████████████████████████████████████████████████████████████▌ │ +│ LONDON │ CITY OF LONDON │ 274 │ 3160502 │ ███████████████████████████████████████████████████████████████▏ │ +│ LONDON │ KENSINGTON AND CHELSEA │ 2550 │ 2308478 │ ██████████████████████████████████████████████▏ │ +│ LEATHERHEAD │ ELMBRIDGE │ 114 │ 1897407 │ █████████████████████████████████████▊ │ +│ LONDON │ CAMDEN │ 3033 │ 1805404 │ ████████████████████████████████████ │ +│ VIRGINIA WATER │ RUNNYMEDE │ 156 │ 1753247 │ ███████████████████████████████████ │ +│ WINDLESHAM │ SURREY HEATH │ 108 │ 1677613 │ █████████████████████████████████▌ │ +│ THORNTON HEATH │ CROYDON │ 546 │ 1671721 │ █████████████████████████████████▍ │ +│ BARNET │ ENFIELD │ 124 │ 1505840 │ ██████████████████████████████ │ +│ COBHAM │ ELMBRIDGE │ 387 │ 1237250 │ ████████████████████████▋ │ +│ LONDON │ ISLINGTON │ 2668 │ 1236980 │ ████████████████████████▋ │ +│ OXFORD │ SOUTH OXFORDSHIRE │ 321 │ 1220907 │ ████████████████████████▍ │ +│ LONDON │ RICHMOND UPON THAMES │ 704 │ 1215551 │ ████████████████████████▎ │ +│ LONDON │ HOUNSLOW │ 671 │ 1207493 │ ████████████████████████▏ │ +│ ASCOT │ WINDSOR AND MAIDENHEAD │ 407 │ 1183299 │ ███████████████████████▋ │ +│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 330 │ 1175615 │ ███████████████████████▌ │ +│ RICHMOND │ RICHMOND UPON THAMES │ 874 │ 1110444 │ ██████████████████████▏ │ +│ LONDON │ HAMMERSMITH AND FULHAM │ 3086 │ 1053983 │ █████████████████████ │ +│ SURBITON │ ELMBRIDGE │ 100 │ 1011800 │ ████████████████████▏ │ +│ RADLETT │ HERTSMERE │ 283 │ 1011712 │ ████████████████████▏ │ +│ SALCOMBE │ SOUTH HAMS │ 127 │ 1011624 │ ████████████████████▏ │ +│ WEYBRIDGE │ ELMBRIDGE │ 655 │ 1007265 │ ████████████████████▏ │ +│ ESHER │ ELMBRIDGE │ 485 │ 986581 │ ███████████████████▋ │ +│ LEATHERHEAD │ GUILDFORD │ 202 │ 977320 │ ███████████████████▌ │ +│ BURFORD │ WEST OXFORDSHIRE │ 111 │ 966893 │ ███████████████████▎ │ +│ BROCKENHURST │ NEW FOREST │ 129 │ 956675 │ ███████████████████▏ │ +│ HINDHEAD │ WAVERLEY │ 137 │ 953753 │ ███████████████████ │ +│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 419 │ 951121 │ ███████████████████ │ +│ EAST MOLESEY │ ELMBRIDGE │ 192 │ 936769 │ ██████████████████▋ │ +│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 146 │ 925515 │ ██████████████████▌ │ +│ LONDON │ TOWER HAMLETS │ 4388 │ 918304 │ ██████████████████▎ │ +│ OLNEY │ MILTON KEYNES │ 235 │ 910646 │ ██████████████████▏ │ +│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 540 │ 902418 │ ██████████████████ │ +│ LONDON │ SOUTHWARK │ 3885 │ 892997 │ █████████████████▋ │ +│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 960 │ 885969 │ █████████████████▋ │ +│ LONDON │ EALING │ 2658 │ 871755 │ █████████████████▍ │ +│ CRANBROOK │ TUNBRIDGE WELLS │ 431 │ 862348 │ █████████████████▏ │ +│ LONDON │ MERTON │ 2099 │ 859118 │ █████████████████▏ │ +│ BELVEDERE │ BEXLEY │ 346 │ 842423 │ ████████████████▋ │ +│ GUILDFORD │ WAVERLEY │ 143 │ 841277 │ ████████████████▋ │ +│ HARPENDEN │ ST ALBANS │ 657 │ 841216 │ ████████████████▋ │ +│ LONDON │ HACKNEY │ 3307 │ 837090 │ ████████████████▋ │ +│ LONDON │ WANDSWORTH │ 6566 │ 832663 │ ████████████████▋ │ +│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 123 │ 824299 │ ████████████████▍ │ +│ KINGS LANGLEY │ DACORUM │ 145 │ 821331 │ ████████████████▍ │ +│ BERKHAMSTED │ DACORUM │ 543 │ 818415 │ ████████████████▎ │ +│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 226 │ 802807 │ ████████████████ │ +│ BILLINGSHURST │ CHICHESTER │ 144 │ 797829 │ ███████████████▊ │ +│ WOKING │ GUILDFORD │ 176 │ 793494 │ ███████████████▋ │ +│ STOCKBRIDGE │ TEST VALLEY │ 178 │ 793269 │ ███████████████▋ │ +│ EPSOM │ REIGATE AND BANSTEAD │ 172 │ 791862 │ ███████████████▋ │ +│ TONBRIDGE │ TUNBRIDGE WELLS │ 360 │ 787876 │ ███████████████▋ │ +│ TEDDINGTON │ RICHMOND UPON THAMES │ 595 │ 786492 │ ███████████████▋ │ +│ TWICKENHAM │ RICHMOND UPON THAMES │ 1155 │ 786193 │ ███████████████▋ │ +│ LYNDHURST │ NEW FOREST │ 102 │ 785593 │ ███████████████▋ │ +│ LONDON │ LAMBETH │ 5228 │ 774574 │ ███████████████▍ │ +│ LONDON │ BARNET │ 3955 │ 773259 │ ███████████████▍ │ +│ OXFORD │ VALE OF WHITE HORSE │ 353 │ 772088 │ ███████████████▍ │ +│ TONBRIDGE │ MAIDSTONE │ 305 │ 770740 │ ███████████████▍ │ +│ LUTTERWORTH │ HARBOROUGH │ 538 │ 768634 │ ███████████████▎ │ +│ WOODSTOCK │ WEST OXFORDSHIRE │ 140 │ 766037 │ ███████████████▎ │ +│ MIDHURST │ CHICHESTER │ 257 │ 764815 │ ███████████████▎ │ +│ MARLOW │ BUCKINGHAMSHIRE │ 327 │ 761876 │ ███████████████▏ │ +│ LONDON │ NEWHAM │ 3237 │ 761784 │ ███████████████▏ │ +│ ALDERLEY EDGE │ CHESHIRE EAST │ 178 │ 757318 │ ███████████████▏ │ +│ LUTON │ CENTRAL BEDFORDSHIRE │ 212 │ 754283 │ ███████████████ │ +│ PETWORTH │ CHICHESTER │ 154 │ 754220 │ ███████████████ │ +│ ALRESFORD │ WINCHESTER │ 219 │ 752718 │ ███████████████ │ +│ POTTERS BAR │ WELWYN HATFIELD │ 174 │ 748465 │ ██████████████▊ │ +│ HASLEMERE │ CHICHESTER │ 128 │ 746907 │ ██████████████▊ │ +│ TADWORTH │ REIGATE AND BANSTEAD │ 502 │ 743252 │ ██████████████▋ │ +│ THAMES DITTON │ ELMBRIDGE │ 244 │ 741913 │ ██████████████▋ │ +│ REIGATE │ REIGATE AND BANSTEAD │ 581 │ 738198 │ ██████████████▋ │ +│ BOURNE END │ BUCKINGHAMSHIRE │ 138 │ 735190 │ ██████████████▋ │ +│ SEVENOAKS │ SEVENOAKS │ 1156 │ 730018 │ ██████████████▌ │ +│ OXTED │ TANDRIDGE │ 336 │ 729123 │ ██████████████▌ │ +│ INGATESTONE │ BRENTWOOD │ 166 │ 728103 │ ██████████████▌ │ +│ LONDON │ BRENT │ 2079 │ 720605 │ ██████████████▍ │ +│ LONDON │ HARINGEY │ 3216 │ 717780 │ ██████████████▎ │ +│ PURLEY │ CROYDON │ 575 │ 716108 │ ██████████████▎ │ +│ WELWYN │ WELWYN HATFIELD │ 222 │ 710603 │ ██████████████▏ │ +│ RICKMANSWORTH │ THREE RIVERS │ 798 │ 704571 │ ██████████████ │ +│ BANSTEAD │ REIGATE AND BANSTEAD │ 401 │ 701293 │ ██████████████ │ +│ CHIGWELL │ EPPING FOREST │ 261 │ 701203 │ ██████████████ │ +│ PINNER │ HARROW │ 528 │ 698885 │ █████████████▊ │ +│ HASLEMERE │ WAVERLEY │ 280 │ 696659 │ █████████████▊ │ +│ SLOUGH │ BUCKINGHAMSHIRE │ 396 │ 694917 │ █████████████▊ │ +│ WALTON-ON-THAMES │ ELMBRIDGE │ 946 │ 692395 │ █████████████▋ │ +│ READING │ SOUTH OXFORDSHIRE │ 318 │ 691988 │ █████████████▋ │ +│ NORTHWOOD │ HILLINGDON │ 271 │ 690643 │ █████████████▋ │ +│ FELTHAM │ HOUNSLOW │ 763 │ 688595 │ █████████████▋ │ +│ ASHTEAD │ MOLE VALLEY │ 303 │ 687923 │ █████████████▋ │ +│ BARNET │ BARNET │ 975 │ 686980 │ █████████████▋ │ +│ WOKING │ SURREY HEATH │ 283 │ 686669 │ █████████████▋ │ +│ MALMESBURY │ WILTSHIRE │ 323 │ 683324 │ █████████████▋ │ +│ AMERSHAM │ BUCKINGHAMSHIRE │ 496 │ 680962 │ █████████████▌ │ +│ CHISLEHURST │ BROMLEY │ 430 │ 680209 │ █████████████▌ │ +│ HYTHE │ FOLKESTONE AND HYTHE │ 490 │ 676908 │ █████████████▌ │ +│ MAYFIELD │ WEALDEN │ 101 │ 676210 │ █████████████▌ │ +│ ASCOT │ BRACKNELL FOREST │ 168 │ 676004 │ █████████████▌ │ +└──────────────────────┴────────────────────────┴──────┴─────────┴────────────────────────────────────────────────────────────────────┘ +``` + +### Summary {#summary} + All 3 queries work much faster and read fewer rows. +```text +Query 1 + +no projection: 27 rows in set. Elapsed: 0.158 sec. Processed 26.32 million rows, 157.93 MB (166.57 million rows/s., 999.39 MB/s.) + projection: 27 rows in set. Elapsed: 0.007 sec. Processed 105.96 thousand rows, 3.33 MB (14.58 million rows/s., 458.13 MB/s.) + + +Query 2 + +no projection: 27 rows in set. Elapsed: 0.163 sec. Processed 26.32 million rows, 80.01 MB (161.75 million rows/s., 491.64 MB/s.) + projection: 27 rows in set. Elapsed: 0.008 sec. Processed 105.96 thousand rows, 3.67 MB (13.29 million rows/s., 459.89 MB/s.) + +Query 3 + +no projection: 100 rows in set. Elapsed: 0.069 sec. Processed 26.32 million rows, 62.47 MB (382.13 million rows/s., 906.93 MB/s.) + projection: 100 rows in set. Elapsed: 0.029 sec. Processed 8.08 thousand rows, 511.08 KB (276.06 thousand rows/s., 17.47 MB/s.) ``` -Q1) -no projection: 27 rows in set. Elapsed: 0.027 sec. Processed 26.25 million rows, 157.49 MB (955.96 million rows/s., 5.74 GB/s.) - projection: 27 rows in set. Elapsed: 0.003 sec. Processed 106.87 thousand rows, 3.21 MB (31.92 million rows/s., 959.03 MB/s.) -``` + +### Test It in Playground {#playground} + +The dataset is also available in the [Online Playground](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIHRvd24sIGRpc3RyaWN0LCBjb3VudCgpIEFTIGMsIHJvdW5kKGF2ZyhwcmljZSkpIEFTIHByaWNlLCBiYXIocHJpY2UsIDAsIDUwMDAwMDAsIDEwMCkgRlJPTSB1a19wcmljZV9wYWlkIFdIRVJFIGRhdGUgPj0gJzIwMjAtMDEtMDEnIEdST1VQIEJZIHRvd24sIGRpc3RyaWN0IEhBVklORyBjID49IDEwMCBPUkRFUiBCWSBwcmljZSBERVNDIExJTUlUIDEwMA==). diff --git a/docs/en/getting-started/example-datasets/wikistat.md b/docs/en/getting-started/example-datasets/wikistat.md index 619711582f4..3e3f7b164ce 100644 --- a/docs/en/getting-started/example-datasets/wikistat.md +++ b/docs/en/getting-started/example-datasets/wikistat.md @@ -30,4 +30,4 @@ $ cat links.txt | while read link; do wget http://dumps.wikimedia.org/other/page $ ls -1 /opt/wikistat/ | grep gz | while read i; do echo $i; gzip -cd /opt/wikistat/$i | ./wikistat-loader --time="$(echo -n $i | sed -r 's/pagecounts-([0-9]{4})([0-9]{2})([0-9]{2})-([0-9]{2})([0-9]{2})([0-9]{2})\.gz/\1-\2-\3 \4-00-00/')" | clickhouse-client --query="INSERT INTO wikistat FORMAT TabSeparated"; done ``` -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/wikistat/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/wikistat/) diff --git a/docs/en/getting-started/index.md b/docs/en/getting-started/index.md index 066809aac89..372e8d7bd64 100644 --- a/docs/en/getting-started/index.md +++ b/docs/en/getting-started/index.md @@ -12,4 +12,4 @@ If you are new to ClickHouse and want to get a hands-on feeling of its performan - [Go through detailed tutorial](../getting-started/tutorial.md) - [Experiment with example datasets](../getting-started/example-datasets/ontime.md) -[Original article](https://clickhouse.tech/docs/en/getting_started/) +[Original article](https://clickhouse.com/docs/en/getting_started/) diff --git a/docs/en/getting-started/install.md b/docs/en/getting-started/install.md index 517be8704e4..508cd51e9f8 100644 --- a/docs/en/getting-started/install.md +++ b/docs/en/getting-started/install.md @@ -29,7 +29,7 @@ It is recommended to use official pre-compiled `deb` packages for Debian or Ubun If you want to use the most recent version, replace `stable` with `testing` (this is recommended for your testing environments). -You can also download and install packages manually from [here](https://repo.clickhouse.tech/deb/stable/main/). +You can also download and install packages manually from [here](https://repo.clickhouse.com/deb/stable/main/). #### Packages {#packages} @@ -38,6 +38,10 @@ You can also download and install packages manually from [here](https://repo.cli - `clickhouse-client` — Creates a symbolic link for `clickhouse-client` and other client-related tools. and installs client configuration files. - `clickhouse-common-static-dbg` — Installs ClickHouse compiled binary files with debug info. +!!! attention "Attention" + If you need to install specific version of ClickHouse you have to install all packages with the same version: + `sudo apt-get install clickhouse-server=21.8.5.7 clickhouse-client=21.8.5.7 clickhouse-common-static=21.8.5.7` + ### From RPM Packages {#from-rpm-packages} It is recommended to use official pre-compiled `rpm` packages for CentOS, RedHat, and all other rpm-based Linux distributions. @@ -46,8 +50,8 @@ First, you need to add the official repository: ``` bash sudo yum install yum-utils -sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG -sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64 +sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG +sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/stable/x86_64 ``` If you want to use the most recent version, replace `stable` with `testing` (this is recommended for your testing environments). `prestable` is sometimes also available. @@ -58,21 +62,21 @@ Then run these commands to install packages: sudo yum install clickhouse-server clickhouse-client ``` -You can also download and install packages manually from [here](https://repo.clickhouse.tech/rpm/stable/x86_64). +You can also download and install packages manually from [here](https://repo.clickhouse.com/rpm/stable/x86_64). ### From Tgz Archives {#from-tgz-archives} It is recommended to use official pre-compiled `tgz` archives for all Linux distributions, where installation of `deb` or `rpm` packages is not possible. -The required version can be downloaded with `curl` or `wget` from repository https://repo.clickhouse.tech/tgz/. +The required version can be downloaded with `curl` or `wget` from repository https://repo.clickhouse.com/tgz/. After that downloaded archives should be unpacked and installed with installation scripts. Example for the latest version: ``` bash export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1` -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-server-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-client-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-server-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-client-$LATEST_VERSION.tgz tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh @@ -92,14 +96,14 @@ For production environments, it’s recommended to use the latest `stable`-versi ### From Docker Image {#from-docker-image} -To run ClickHouse inside Docker follow the guide on [Docker Hub](https://hub.docker.com/r/yandex/clickhouse-server/). Those images use official `deb` packages inside. +To run ClickHouse inside Docker follow the guide on [Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/). Those images use official `deb` packages inside. ### Single Binary {#from-single-binary} -You can install ClickHouse on Linux using a single portable binary from the latest commit of the `master` branch: [https://builds.clickhouse.tech/master/amd64/clickhouse]. +You can install ClickHouse on Linux using a single portable binary from the latest commit of the `master` branch: [https://builds.clickhouse.com/master/amd64/clickhouse]. ``` bash -curl -O 'https://builds.clickhouse.tech/master/amd64/clickhouse' && chmod a+x clickhouse +curl -O 'https://builds.clickhouse.com/master/amd64/clickhouse' && chmod a+x clickhouse sudo ./clickhouse install ``` @@ -107,10 +111,10 @@ sudo ./clickhouse install For non-Linux operating systems and for AArch64 CPU arhitecture, ClickHouse builds are provided as a cross-compiled binary from the latest commit of the `master` branch (with a few hours delay). -- [MacOS x86_64](https://builds.clickhouse.tech/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/macos/clickhouse' && chmod a+x ./clickhouse` -- [MacOS Aarch64 (Apple Silicon)](https://builds.clickhouse.tech/master/macos-aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/macos-aarch64/clickhouse' && chmod a+x ./clickhouse` -- [FreeBSD x86_64](https://builds.clickhouse.tech/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/freebsd/clickhouse' && chmod a+x ./clickhouse` -- [Linux AArch64](https://builds.clickhouse.tech/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/aarch64/clickhouse' && chmod a+x ./clickhouse` +- [MacOS x86_64](https://builds.clickhouse.com/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/macos/clickhouse' && chmod a+x ./clickhouse` +- [MacOS Aarch64 (Apple Silicon)](https://builds.clickhouse.com/master/macos-aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/macos-aarch64/clickhouse' && chmod a+x ./clickhouse` +- [FreeBSD x86_64](https://builds.clickhouse.com/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/freebsd/clickhouse' && chmod a+x ./clickhouse` +- [Linux AArch64](https://builds.clickhouse.com/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/aarch64/clickhouse' && chmod a+x ./clickhouse` After downloading, you can use the `clickhouse client` to connect to the server, or `clickhouse local` to process local data. @@ -199,6 +203,6 @@ SELECT 1 **Congratulations, the system works!** -To continue experimenting, you can download one of the test data sets or go through [tutorial](https://clickhouse.tech/tutorial.html). +To continue experimenting, you can download one of the test data sets or go through [tutorial](https://clickhouse.com/tutorial.html). -[Original article](https://clickhouse.tech/docs/en/getting_started/install/) +[Original article](https://clickhouse.com/docs/en/getting_started/install/) diff --git a/docs/en/getting-started/playground.md b/docs/en/getting-started/playground.md index 9adf0423cf3..90e3eedb764 100644 --- a/docs/en/getting-started/playground.md +++ b/docs/en/getting-started/playground.md @@ -5,7 +5,7 @@ toc_title: Playground # ClickHouse Playground {#clickhouse-playground} -[ClickHouse Playground](https://play.clickhouse.tech) allows people to experiment with ClickHouse by running queries instantly, without setting up their server or cluster. +[ClickHouse Playground](https://play.clickhouse.com) allows people to experiment with ClickHouse by running queries instantly, without setting up their server or cluster. Several example datasets are available in Playground as well as sample queries that show ClickHouse features. There’s also a selection of ClickHouse LTS releases to experiment with. ClickHouse Playground gives the experience of m2.small [Managed Service for ClickHouse](https://cloud.yandex.com/services/managed-clickhouse) instance (4 vCPU, 32 GB RAM) hosted in [Yandex.Cloud](https://cloud.yandex.com/). More information about [cloud providers](../commercial/cloud.md). @@ -16,15 +16,15 @@ You can make queries to Playground using any HTTP client, for example [curl](htt | Parameter | Value | |:--------------------|:----------------------------------------| -| HTTPS endpoint | `https://play-api.clickhouse.tech:8443` | -| Native TCP endpoint | `play-api.clickhouse.tech:9440` | +| HTTPS endpoint | `https://play-api.clickhouse.com:8443` | +| Native TCP endpoint | `play-api.clickhouse.com:9440` | | User | `playground` | | Password | `clickhouse` | There are additional endpoints with specific ClickHouse releases to experiment with their differences (ports and user/password are the same as above): -- 20.3 LTS: `play-api-v20-3.clickhouse.tech` -- 19.14 LTS: `play-api-v19-14.clickhouse.tech` +- 20.3 LTS: `play-api-v20-3.clickhouse.com` +- 19.14 LTS: `play-api-v19-14.clickhouse.com` !!! note "Note" All these endpoints require a secure TLS connection. @@ -48,13 +48,13 @@ The following settings are also enforced: HTTPS endpoint example with `curl`: ``` bash -curl "https://play-api.clickhouse.tech:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" +curl "https://play-api.clickhouse.com:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" ``` TCP endpoint example with [CLI](../interfaces/cli.md): ``` bash -clickhouse client --secure -h play-api.clickhouse.tech --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" +clickhouse client --secure -h play-api.clickhouse.com --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" ``` ## Implementation Details {#implementation-details} diff --git a/docs/en/getting-started/tutorial.md b/docs/en/getting-started/tutorial.md index 694a82e100e..e08b319f2a4 100644 --- a/docs/en/getting-started/tutorial.md +++ b/docs/en/getting-started/tutorial.md @@ -85,8 +85,8 @@ Now it’s time to fill our ClickHouse server with some sample data. In this tut ### Download and Extract Table Data {#download-and-extract-table-data} ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv ``` The extracted files are about 10GB in size. @@ -659,4 +659,4 @@ INSERT INTO tutorial.hits_replica SELECT * FROM tutorial.hits_local; Replication operates in multi-master mode. Data can be loaded into any replica, and the system then syncs it with other instances automatically. Replication is asynchronous so at a given moment, not all replicas may contain recently inserted data. At least one replica should be up to allow data ingestion. Others will sync up data and repair consistency once they will become active again. Note that this approach allows for the low possibility of a loss of recently inserted data. -[Original article](https://clickhouse.tech/docs/en/getting_started/tutorial/) +[Original article](https://clickhouse.com/docs/en/getting_started/tutorial/) diff --git a/docs/en/guides/apply-catboost-model.md b/docs/en/guides/apply-catboost-model.md index b354a42a843..9fd48fcc62d 100644 --- a/docs/en/guides/apply-catboost-model.md +++ b/docs/en/guides/apply-catboost-model.md @@ -239,4 +239,4 @@ FROM !!! note "Note" More info about [avg()](../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg) and [log()](../sql-reference/functions/math-functions.md) functions. -[Original article](https://clickhouse.tech/docs/en/guides/apply_catboost_model/) +[Original article](https://clickhouse.com/docs/en/guides/apply_catboost_model/) diff --git a/docs/en/guides/index.md b/docs/en/guides/index.md index 8a48a411b7a..eb4ca9af367 100644 --- a/docs/en/guides/index.md +++ b/docs/en/guides/index.md @@ -11,4 +11,4 @@ List of detailed step-by-step instructions that help to solve various tasks usin - [Tutorial on simple cluster set-up](../getting-started/tutorial.md) - [Applying a CatBoost model in ClickHouse](../guides/apply-catboost-model.md) -[Original article](https://clickhouse.tech/docs/en/guides/) +[Original article](https://clickhouse.com/docs/en/guides/) diff --git a/docs/en/index.md b/docs/en/index.md index 12e72ebdf3b..532be035bbc 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -92,4 +92,4 @@ This is not done in “normal” databases, because it does not make sense when Note that for CPU efficiency, the query language must be declarative (SQL or MDX), or at least a vector (J, K). The query should only contain implicit loops, allowing for optimization. -{## [Original article](https://clickhouse.tech/docs/en/) ##} +{## [Original article](https://clickhouse.com/docs/en/) ##} diff --git a/docs/en/interfaces/cli.md b/docs/en/interfaces/cli.md index 8457ea41857..70b7d59b037 100644 --- a/docs/en/interfaces/cli.md +++ b/docs/en/interfaces/cli.md @@ -141,7 +141,7 @@ Since version 20.5, `clickhouse-client` has automatic syntax highlighting (alway Example of a config file: -``` xml +```xml username password @@ -149,4 +149,30 @@ Example of a config file: ``` -[Original article](https://clickhouse.tech/docs/en/interfaces/cli/) +### Query ID Format {#query-id-format} + +In interactive mode `clickhouse-client` shows query ID for every query. By default, the ID is formatted like this: + +```sql +Query id: 927f137d-00f1-4175-8914-0dd066365e96 +``` + +A custom format may be specified in a configuration file inside a `query_id_formats` tag. `{query_id}` placeholder in the format string is replaced with the ID of a query. Several format strings are allowed inside the tag. +This feature can be used to generate URLs to facilitate profiling of queries. + +**Example** + +```xml + + + http://speedscope-host/#profileURL=qp%3Fid%3D{query_id} + + +``` + +If the configuration above is applied, the ID of a query is shown in the following format: + +``` text +speedscope:http://speedscope-host/#profileURL=qp%3Fid%3Dc8ecc783-e753-4b38-97f1-42cddfb98b7d +``` + diff --git a/docs/en/interfaces/cpp.md b/docs/en/interfaces/cpp.md index 479b0ac87d9..dcd1228ea0f 100644 --- a/docs/en/interfaces/cpp.md +++ b/docs/en/interfaces/cpp.md @@ -7,4 +7,4 @@ toc_title: C++ Client Library See README at [clickhouse-cpp](https://github.com/ClickHouse/clickhouse-cpp) repository. -[Original article](https://clickhouse.tech/docs/en/interfaces/cpp/) +[Original article](https://clickhouse.com/docs/en/interfaces/cpp/) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index 015afd1cd24..07104311b44 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -23,20 +23,19 @@ The supported formats are: | [CustomSeparated](#format-customseparated) | ✔ | ✔ | | [Values](#data-format-values) | ✔ | ✔ | | [Vertical](#vertical) | ✗ | ✔ | -| [VerticalRaw](#verticalraw) | ✗ | ✔ | | [JSON](#json) | ✗ | ✔ | | [JSONAsString](#jsonasstring) | ✔ | ✗ | -| [JSONString](#jsonstring) | ✗ | ✔ | +| [JSONStrings](#jsonstrings) | ✗ | ✔ | | [JSONCompact](#jsoncompact) | ✗ | ✔ | -| [JSONCompactString](#jsoncompactstring) | ✗ | ✔ | +| [JSONCompactStrings](#jsoncompactstrings) | ✗ | ✔ | | [JSONEachRow](#jsoneachrow) | ✔ | ✔ | | [JSONEachRowWithProgress](#jsoneachrowwithprogress) | ✗ | ✔ | | [JSONStringsEachRow](#jsonstringseachrow) | ✔ | ✔ | | [JSONStringsEachRowWithProgress](#jsonstringseachrowwithprogress) | ✗ | ✔ | | [JSONCompactEachRow](#jsoncompacteachrow) | ✔ | ✔ | | [JSONCompactEachRowWithNamesAndTypes](#jsoncompacteachrowwithnamesandtypes) | ✔ | ✔ | -| [JSONCompactStringEachRow](#jsoncompactstringeachrow) | ✔ | ✔ | -| [JSONCompactStringEachRowWithNamesAndTypes](#jsoncompactstringeachrowwithnamesandtypes) | ✔ | ✔ | +| [JSONCompactStringsEachRow](#jsoncompactstringseachrow) | ✔ | ✔ | +| [JSONCompactStringsEachRowWithNamesAndTypes](#jsoncompactstringseachrowwithnamesandtypes) | ✔ | ✔ | | [TSKV](#tskv) | ✔ | ✔ | | [Pretty](#pretty) | ✗ | ✔ | | [PrettyCompact](#prettycompact) | ✗ | ✔ | @@ -60,6 +59,7 @@ The supported formats are: | [LineAsString](#lineasstring) | ✔ | ✗ | | [Regexp](#data-format-regexp) | ✔ | ✗ | | [RawBLOB](#rawblob) | ✔ | ✔ | +| [MsgPack](#msgpack) | ✔ | ✔ | You can control some format processing parameters with the ClickHouse settings. For more information read the [Settings](../operations/settings/settings.md) section. @@ -74,7 +74,7 @@ The `TabSeparated` format is convenient for processing data using custom program The `TabSeparated` format supports outputting total values (when using WITH TOTALS) and extreme values (when ‘extremes’ is set to 1). In these cases, the total values and extremes are output after the main data. The main result, total values, and extremes are separated from each other by an empty line. Example: ``` sql -SELECT EventDate, count() AS c FROM test.hits GROUP BY EventDate WITH TOTALS ORDER BY EventDate FORMAT TabSeparated`` +SELECT EventDate, count() AS c FROM test.hits GROUP BY EventDate WITH TOTALS ORDER BY EventDate FORMAT TabSeparated ``` ``` text @@ -386,7 +386,7 @@ The CSV format supports the output of totals and extremes the same way as `TabSe ## CSVWithNames {#csvwithnames} -Also prints the header row, similar to `TabSeparatedWithNames`. +Also prints the header row, similar to [TabSeparatedWithNames](#tabseparatedwithnames). ## CustomSeparated {#format-customseparated} @@ -464,7 +464,7 @@ ClickHouse supports [NULL](../sql-reference/syntax.md), which is displayed as `n - [JSONEachRow](#jsoneachrow) format - [output_format_json_array_of_rows](../operations/settings/settings.md#output-format-json-array-of-rows) setting -## JSONString {#jsonstring} +## JSONStrings {#jsonstrings} Differs from JSON only in that data fields are output in strings, not in typed JSON values. @@ -541,7 +541,7 @@ Result: ``` ## JSONCompact {#jsoncompact} -## JSONCompactString {#jsoncompactstring} +## JSONCompactStrings {#jsoncompactstrings} Differs from JSON only in that data rows are output in arrays, not in objects. @@ -580,7 +580,7 @@ Example: ``` ``` -// JSONCompactString +// JSONCompactStrings { "meta": [ @@ -614,7 +614,7 @@ Example: ## JSONEachRow {#jsoneachrow} ## JSONStringsEachRow {#jsonstringseachrow} ## JSONCompactEachRow {#jsoncompacteachrow} -## JSONCompactStringEachRow {#jsoncompactstringeachrow} +## JSONCompactStringsEachRow {#jsoncompactstringseachrow} When using these formats, ClickHouse outputs rows as separated, newline-delimited JSON values, but the data as a whole is not valid JSON. @@ -639,9 +639,9 @@ Differs from `JSONEachRow`/`JSONStringsEachRow` in that ClickHouse will also yie ``` ## JSONCompactEachRowWithNamesAndTypes {#jsoncompacteachrowwithnamesandtypes} -## JSONCompactStringEachRowWithNamesAndTypes {#jsoncompactstringeachrowwithnamesandtypes} +## JSONCompactStringsEachRowWithNamesAndTypes {#jsoncompactstringseachrowwithnamesandtypes} -Differs from `JSONCompactEachRow`/`JSONCompactStringEachRow` in that the column names and types are written as the first two rows. +Differs from `JSONCompactEachRow`/`JSONCompactStringsEachRow` in that the column names and types are written as the first two rows. ```json ["'hello'", "multiply(42, number)", "range(5)"] @@ -943,10 +943,6 @@ test: string with 'quotes' and with some special This format is only appropriate for outputting a query result, but not for parsing (retrieving data to insert in a table). -## VerticalRaw {#verticalraw} - -Similar to [Vertical](#vertical), but with escaping disabled. This format is only suitable for outputting query results, not for parsing (receiving data and inserting it in the table). - ## XML {#xml} XML format is suitable only for output, not for parsing. Example: @@ -1270,6 +1266,8 @@ You can insert Parquet data from a file into ClickHouse table by the following c $ cat {filename} | clickhouse-client --query="INSERT INTO {some_table} FORMAT Parquet" ``` +To insert data into [Nested](../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs values you must switch on the [input_format_parquet_import_nested](../operations/settings/settings.md#input_format_parquet_import_nested) setting. + You can select data from a ClickHouse table and save them into some file in the Parquet format by the following command: ``` bash @@ -1328,6 +1326,8 @@ You can insert Arrow data from a file into ClickHouse table by the following com $ cat filename.arrow | clickhouse-client --query="INSERT INTO some_table FORMAT Arrow" ``` +To insert data into [Nested](../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs values you must switch on the [input_format_arrow_import_nested](../operations/settings/settings.md#input_format_arrow_import_nested) setting. + ### Selecting Data {#selecting-data-arrow} You can select data from a ClickHouse table and save them into some file in the Arrow format by the following command: @@ -1384,6 +1384,8 @@ You can insert ORC data from a file into ClickHouse table by the following comma $ cat filename.orc | clickhouse-client --query="INSERT INTO some_table FORMAT ORC" ``` +To insert data into [Nested](../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs values you must switch on the [input_format_orc_import_nested](../operations/settings/settings.md#input_format_orc_import_nested) setting. + ### Selecting Data {#selecting-data-2} You can select data from a ClickHouse table and save them into some file in the ORC format by the following command: @@ -1545,4 +1547,33 @@ Result: f9725a22f9191e064120d718e26862a9 - ``` -[Original article](https://clickhouse.tech/docs/en/interfaces/formats/) +## MsgPack {#msgpack} + +ClickHouse supports reading and writing [MessagePack](https://msgpack.org/) data files. + +### Data Types Matching {#data-types-matching-msgpack} + +| MessagePack data type (`INSERT`) | ClickHouse data type | MessagePack data type (`SELECT`) | +|--------------------------------------------------------------------|-----------------------------------------------------------|------------------------------------| +| `uint N`, `positive fixint` | [UIntN](../sql-reference/data-types/int-uint.md) | `uint N` | +| `int N` | [IntN](../sql-reference/data-types/int-uint.md) | `int N` | +| `bool` | [UInt8](../sql-reference/data-types/int-uint.md) | `uint 8` | +| `fixstr`, `str 8`, `str 16`, `str 32`, `bin 8`, `bin 16`, `bin 32` | [String](../sql-reference/data-types/string.md) | `bin 8`, `bin 16`, `bin 32` | +| `fixstr`, `str 8`, `str 16`, `str 32`, `bin 8`, `bin 16`, `bin 32` | [FixedString](../sql-reference/data-types/fixedstring.md) | `bin 8`, `bin 16`, `bin 32` | +| `float 32` | [Float32](../sql-reference/data-types/float.md) | `float 32` | +| `float 64` | [Float64](../sql-reference/data-types/float.md) | `float 64` | +| `uint 16` | [Date](../sql-reference/data-types/date.md) | `uint 16` | +| `uint 32` | [DateTime](../sql-reference/data-types/datetime.md) | `uint 32` | +| `uint 64` | [DateTime64](../sql-reference/data-types/datetime.md) | `uint 64` | +| `fixarray`, `array 16`, `array 32` | [Array](../sql-reference/data-types/array.md) | `fixarray`, `array 16`, `array 32` | +| `fixmap`, `map 16`, `map 32` | [Map](../sql-reference/data-types/map.md) | `fixmap`, `map 16`, `map 32` | + +Example: + +Writing to a file ".msgpk": + +```sql +$ clickhouse-client --query="CREATE TABLE msgpack (array Array(UInt8)) ENGINE = Memory;" +$ clickhouse-client --query="INSERT INTO msgpack VALUES ([0, 1, 2, 3, 42, 253, 254, 255]), ([255, 254, 253, 42, 3, 2, 1, 0])"; +$ clickhouse-client --query="SELECT * FROM msgpack FORMAT MsgPack" > tmp_msgpack.msgpk; +``` diff --git a/docs/en/interfaces/index.md b/docs/en/interfaces/index.md index 1613e8508a5..10f15ae47d6 100644 --- a/docs/en/interfaces/index.md +++ b/docs/en/interfaces/index.md @@ -24,4 +24,4 @@ There are also a wide range of third-party libraries for working with ClickHouse - [Integrations](../interfaces/third-party/integrations.md) - [Visual interfaces](../interfaces/third-party/gui.md) -[Original article](https://clickhouse.tech/docs/en/interfaces/) +[Original article](https://clickhouse.com/docs/en/interfaces/) diff --git a/docs/en/interfaces/jdbc.md b/docs/en/interfaces/jdbc.md index ec3fa2fe89a..cf97568a8de 100644 --- a/docs/en/interfaces/jdbc.md +++ b/docs/en/interfaces/jdbc.md @@ -10,4 +10,4 @@ toc_title: JDBC Driver - [ClickHouse-Native-JDBC](https://github.com/housepower/ClickHouse-Native-JDBC) - [clickhouse4j](https://github.com/blynkkk/clickhouse4j) -[Original article](https://clickhouse.tech/docs/en/interfaces/jdbc/) +[Original article](https://clickhouse.com/docs/en/interfaces/jdbc/) diff --git a/docs/en/interfaces/mysql.md b/docs/en/interfaces/mysql.md index ee9af925671..38bcc2b68f8 100644 --- a/docs/en/interfaces/mysql.md +++ b/docs/en/interfaces/mysql.md @@ -44,4 +44,10 @@ Restrictions: - some data types are sent as strings -[Original article](https://clickhouse.tech/docs/en/interfaces/mysql/) +To cancel a long query use `KILL QUERY connection_id` statement (it is replaced with `KILL QUERY WHERE query_id = connection_id` while proceeding). For example: + +``` bash +$ mysql --protocol tcp -h mysql_server -P 9004 default -u default --password=123 -e "KILL QUERY 123456;" +``` + +[Original article](https://clickhouse.com/docs/en/interfaces/mysql/) diff --git a/docs/en/interfaces/odbc.md b/docs/en/interfaces/odbc.md index 42ae4cf5b53..fa58ed8b43e 100644 --- a/docs/en/interfaces/odbc.md +++ b/docs/en/interfaces/odbc.md @@ -7,4 +7,4 @@ toc_title: ODBC Driver - [Official driver](https://github.com/ClickHouse/clickhouse-odbc) -[Original article](https://clickhouse.tech/docs/en/interfaces/odbc/) +[Original article](https://clickhouse.com/docs/en/interfaces/odbc/) diff --git a/docs/en/interfaces/tcp.md b/docs/en/interfaces/tcp.md index 75ca3e3fd91..b23f8110320 100644 --- a/docs/en/interfaces/tcp.md +++ b/docs/en/interfaces/tcp.md @@ -7,4 +7,4 @@ toc_title: Native Interface (TCP) The native protocol is used in the [command-line client](../interfaces/cli.md), for inter-server communication during distributed query processing, and also in other C++ programs. Unfortunately, native ClickHouse protocol does not have formal specification yet, but it can be reverse-engineered from ClickHouse source code (starting [around here](https://github.com/ClickHouse/ClickHouse/tree/master/src/Client)) and/or by intercepting and analyzing TCP traffic. -[Original article](https://clickhouse.tech/docs/en/interfaces/tcp/) +[Original article](https://clickhouse.com/docs/en/interfaces/tcp/) diff --git a/docs/en/interfaces/third-party/client-libraries.md b/docs/en/interfaces/third-party/client-libraries.md index 835e3c6e98a..cb8679e4bdd 100644 --- a/docs/en/interfaces/third-party/client-libraries.md +++ b/docs/en/interfaces/third-party/client-libraries.md @@ -67,4 +67,4 @@ toc_title: Client Libraries - Haskell - [hdbc-clickhouse](https://github.com/zaneli/hdbc-clickhouse) -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/client_libraries/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/client_libraries/) diff --git a/docs/en/interfaces/third-party/gui.md b/docs/en/interfaces/third-party/gui.md index 2d7f3a24011..06474499ccd 100644 --- a/docs/en/interfaces/third-party/gui.md +++ b/docs/en/interfaces/third-party/gui.md @@ -84,7 +84,7 @@ Features: - Table data preview. - Full-text search. -By default, DBeaver does not connect using a session (the CLI for example does). If you require session support (for example to set settings for your session), edit the driver connection properties and set session_id to a random string (it uses the http connection under the hood). Then you can use any setting from the query window +By default, DBeaver does not connect using a session (the CLI for example does). If you require session support (for example to set settings for your session), edit the driver connection properties and set `session_id` to a random string (it uses the http connection under the hood). Then you can use any setting from the query window. ### clickhouse-cli {#clickhouse-cli} @@ -113,6 +113,22 @@ Features: [MindsDB](https://mindsdb.com/) is an open-source AI layer for databases including ClickHouse that allows you to effortlessly develop, train and deploy state-of-the-art machine learning models. MindsDB Studio(GUI) allows you to train new models from database, interpret predictions made by the model, identify potential data biases, and evaluate and visualize model accuracy using the Explainable AI function to adapt and tune your Machine Learning models faster. +### DBM {#dbm} + +[DBM](https://dbm.incubator.edurt.io/) DBM is a visual management tool for ClickHouse! + +Features: + +- Support query history (pagination, clear all, etc.) +- Support selected sql clauses query +- Support terminating query +- Support table management (metadata, delete, preview) +- Support database management (delete, create) +- Support custom query +- Support multiple data sources management(connection test, monitoring) +- Support monitor (processor, connection, query) +- Support migrate data + ## Commercial {#commercial} ### DataGrip {#datagrip} @@ -190,4 +206,4 @@ SeekTable is [free](https://www.seektable.com/help/cloud-pricing) for personal/i [Chadmin](https://github.com/bun4uk/chadmin) is a simple UI where you can visualize your currently running queries on your ClickHouse cluster and info about them and kill them if you want. -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/gui/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/gui/) diff --git a/docs/en/interfaces/third-party/integrations.md b/docs/en/interfaces/third-party/integrations.md index 48782268940..4a4eee770dc 100644 --- a/docs/en/interfaces/third-party/integrations.md +++ b/docs/en/interfaces/third-party/integrations.md @@ -42,7 +42,7 @@ toc_title: Integrations - [mfedotov/clickhouse](https://forge.puppet.com/mfedotov/clickhouse) - Monitoring - [Graphite](https://graphiteapp.org) - - [graphouse](https://github.com/yandex/graphouse) + - [graphouse](https://github.com/ClickHouse/graphouse) - [carbon-clickhouse](https://github.com/lomik/carbon-clickhouse) - [graphite-clickhouse](https://github.com/lomik/graphite-clickhouse) - [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer) - optimizes staled partitions in [\*GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md#graphitemergetree) if rules from [rollup configuration](../../engines/table-engines/mergetree-family/graphitemergetree.md#rollup-configuration) could be applied @@ -108,4 +108,4 @@ toc_title: Integrations - [GraphQL](https://github.com/graphql) - [activecube-graphql](https://github.com/bitquery/activecube-graphql) -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/integrations/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/integrations/) diff --git a/docs/en/interfaces/third-party/proxy.md b/docs/en/interfaces/third-party/proxy.md index fc01568e35a..31a2d5afae9 100644 --- a/docs/en/interfaces/third-party/proxy.md +++ b/docs/en/interfaces/third-party/proxy.md @@ -41,4 +41,4 @@ Features: Implemented in Go. -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/proxy/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/proxy/) diff --git a/docs/en/introduction/adopters.md b/docs/en/introduction/adopters.md index d408a3d6849..72ebe33292f 100644 --- a/docs/en/introduction/adopters.md +++ b/docs/en/introduction/adopters.md @@ -15,17 +15,17 @@ toc_title: Adopters | AdScribe | Ads | TV Analytics | — | — | [A quote from CTO](https://altinity.com/24x7-support/) | | Ahrefs | SEO | Analytics | — | — | [Job listing](https://ahrefs.com/jobs/data-scientist-search) | | Alibaba Cloud | Cloud | Managed Service | — | — | [Official Website](https://help.aliyun.com/product/144466.html) | -| Aloha Browser | Mobile App | Browser backend | — | — | [Slides in Russian, May 2019](https://presentations.clickhouse.tech/meetup22/aloha.pdf) | +| Aloha Browser | Mobile App | Browser backend | — | — | [Slides in Russian, May 2019](https://presentations.clickhouse.com/meetup22/aloha.pdf) | | Altinity | Cloud, SaaS | Main product | — | — | [Official Website](https://altinity.com/) | | Amadeus | Travel | Analytics | — | — | [Press Release, April 2018](https://www.altinity.com/blog/2018/4/5/amadeus-technologies-launches-investment-and-insights-tool-based-on-machine-learning-and-strategy-algorithms) | | ApiRoad | API marketplace | Analytics | — | — | [Blog post, Nov 2018, Mar 2020](https://pixeljets.com/blog/clickhouse-vs-elasticsearch/) | | Appsflyer | Mobile analytics | Main product | — | — | [Talk in Russian, July 2019](https://www.youtube.com/watch?v=M3wbRlcpBbY) | | ArenaData | Data Platform | Main product | — | — | [Slides in Russian, December 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup38/indexes.pdf) | | Avito | Classifieds | Monitoring | — | — | [Meetup, April 2020](https://www.youtube.com/watch?v=n1tm4j4W8ZQ) | -| Badoo | Dating | Timeseries | — | — | [Slides in Russian, December 2019](https://presentations.clickhouse.tech/meetup38/forecast.pdf) | +| Badoo | Dating | Timeseries | — | — | [Slides in Russian, December 2019](https://presentations.clickhouse.com/meetup38/forecast.pdf) | | Benocs | Network Telemetry and Analytics | Main Product | — | — | [Slides in English, October 2017](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup9/lpm.pdf) | | BIGO | Video | Computing Platform | — | — | [Blog Article, August 2020](https://www.programmersought.com/article/44544895251/) | -| Bloomberg | Finance, Media | Monitoring | 102 servers | — | [Slides, May 2018](https://www.slideshare.net/Altinity/http-analytics-for-6m-requests-per-second-using-clickhouse-by-alexander-bocharov) | +| Bloomberg | Finance, Media | Monitoring | — | — | [Slides, May 2018](https://www.slideshare.net/Altinity/http-analytics-for-6m-requests-per-second-using-clickhouse-by-alexander-bocharov) | | Bloxy | Blockchain | Analytics | — | — | [Slides in Russian, August 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/4_bloxy.pptx) | | Bytedance | Social platforms | — | — | — | [The ClickHouse Meetup East, October 2020](https://www.youtube.com/watch?v=ckChUkC3Pns) | | CardsMobile | Finance | Analytics | — | — | [VC.ru](https://vc.ru/s/cardsmobile/143449-rukovoditel-gruppy-analiza-dannyh) | @@ -56,9 +56,10 @@ toc_title: Adopters | Geniee | Ad network | Main product | — | — | [Blog post in Japanese, July 2017](https://tech.geniee.co.jp/entry/2017/07/20/160100) | | Genotek | Bioinformatics | Main product | — | — | [Video, August 2020](https://youtu.be/v3KyZbz9lEE) | | Glaber | Monitoring | Main product | — | — | [Website](https://glaber.io/) | +| GraphCDN | CDN | Traffic Analytics | — | — | [Blog Post in English, August 2021](https://altinity.com/blog/delivering-insight-on-graphql-apis-with-clickhouse-at-graphcdn/) | | HUYA | Video Streaming | Analytics | — | — | [Slides in Chinese, October 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/7.%20ClickHouse万亿数据分析实践%20李本旺(sundy-li)%20虎牙.pdf) | | ICA | FinTech | Risk Management | — | — | [Blog Post in English, Sep 2020](https://altinity.com/blog/clickhouse-vs-redshift-performance-for-fintech-risk-management?utm_campaign=ClickHouse%20vs%20RedShift&utm_content=143520807&utm_medium=social&utm_source=twitter&hss_channel=tw-3894792263) | -| Idealista | Real Estate | Analytics | — | — | [Blog Post in English, April 2019](https://clickhouse.tech/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | +| Idealista | Real Estate | Analytics | — | — | [Blog Post in English, April 2019](https://clickhouse.com/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | | Infobaleen | AI markting tool | Analytics | — | — | [Official site](https://infobaleen.com) | | Infovista | Networks | Analytics | — | — | [Slides in English, October 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup30/infovista.pdf) | | InnoGames | Games | Metrics, Logging | — | — | [Slides in Russian, September 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/graphite_and_clickHouse.pdf) | @@ -70,7 +71,7 @@ toc_title: Adopters | Jinshuju 金数据 | BI Analytics | Main product | — | — | [Slides in Chinese, October 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup24/3.%20金数据数据架构调整方案Public.pdf) | | Kodiak Data | Clouds | Main product | — | — | [Slides in Engish, April 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup13/kodiak_data.pdf) | | Kontur | Software Development | Metrics | — | — | [Talk in Russian, November 2018](https://www.youtube.com/watch?v=U4u4Bd0FtrY) | -| Kuaishou | Video | — | — | — | [ClickHouse Meetup, October 2018](https://clickhouse.tech/blog/en/2018/clickhouse-community-meetup-in-beijing-on-october-28-2018/) | +| Kuaishou | Video | — | — | — | [ClickHouse Meetup, October 2018](https://clickhouse.com/blog/en/2018/clickhouse-community-meetup-in-beijing-on-october-28-2018/) | | Lawrence Berkeley National Laboratory | Research | Traffic analysis | 1 server | 11.8 TiB | [Slides in English, April 2019](https://www.smitasin.com/presentations/2019-04-17_DOE-NSM.pdf) | | LifeStreet | Ad network | Main product | 75 servers (3 replicas) | 5.27 PiB | [Blog post in Russian, February 2017](https://habr.com/en/post/322620/) | | Mail.ru Cloud Solutions | Cloud services | Main product | — | — | [Article in Russian](https://mcs.mail.ru/help/db-create/clickhouse#) | @@ -126,7 +127,7 @@ toc_title: Adopters | Tencent Music Entertainment (TME) | BigData | Data processing | — | — | [Blog in Chinese, June 2020](https://cloud.tencent.com/developer/article/1637840) | | Tinybird | Real-time Data Products | Data processing | — | — | [Official website](https://www.tinybird.co/) | | Traffic Stars | AD network | — | — | — | [Slides in Russian, May 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup15/lightning/ninja.pdf) | -| Uber | Taxi | Logging | — | — | [Slides, February 2020](https://presentations.clickhouse.tech/meetup40/uber.pdf) | +| Uber | Taxi | Logging | — | — | [Slides, February 2020](https://presentations.clickhouse.com/meetup40/uber.pdf) | | UTMSTAT | Analytics | Main product | — | — | [Blog post, June 2020](https://vc.ru/tribuna/133956-striming-dannyh-iz-servisa-skvoznoy-analitiki-v-clickhouse) | | VKontakte | Social Network | Statistics, Logging | — | — | [Slides in Russian, August 2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/3_vk.pdf) | | VMWare | Cloud | VeloCloud, SDN | — | — | [Product documentation](https://docs.vmware.com/en/vRealize-Operations-Manager/8.3/com.vmware.vcom.metrics.doc/GUID-A9AD72E1-C948-4CA2-971B-919385AB3CA8.html) | @@ -139,9 +140,9 @@ toc_title: Adopters | Xiaoxin Tech | Education | Common purpose | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/sync-clickhouse-with-mysql-mongodb.pptx) | | Ximalaya | Audio sharing | OLAP | — | — | [Slides in English, November 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/ximalaya.pdf) | | Yandex Cloud | Public Cloud | Main product | — | — | [Talk in Russian, December 2019](https://www.youtube.com/watch?v=pgnak9e_E0o) | -| Yandex DataLens | Business Intelligence | Main product | — | — | [Slides in Russian, December 2019](https://presentations.clickhouse.tech/meetup38/datalens.pdf) | +| Yandex DataLens | Business Intelligence | Main product | — | — | [Slides in Russian, December 2019](https://presentations.clickhouse.com/meetup38/datalens.pdf) | | Yandex Market | e-Commerce | Metrics, Logging | — | — | [Talk in Russian, January 2019](https://youtu.be/_l1qP0DyBcA?t=478) | -| Yandex Metrica | Web analytics | Main product | 630 servers in one cluster, 360 servers in another cluster, 1862 servers in one department | 133 PiB / 8.31 PiB / 120 trillion records | [Slides, February 2020](https://presentations.clickhouse.tech/meetup40/introduction/#13) | +| Yandex Metrica | Web analytics | Main product | 630 servers in one cluster, 360 servers in another cluster, 1862 servers in one department | 133 PiB / 8.31 PiB / 120 trillion records | [Slides, February 2020](https://presentations.clickhouse.com/meetup40/introduction/#13) | | Yotascale | Cloud | Data pipeline | — | 2 bn records/day | [LinkedIn (Accomplishments)](https://www.linkedin.com/in/adilsaleem/) | | ЦВТ | Software Development | Metrics, Logging | — | — | [Blog Post, March 2019, in Russian](https://vc.ru/dev/62715-kak-my-stroili-monitoring-na-prometheus-clickhouse-i-elk) | | МКБ | Bank | Web-system monitoring | — | — | [Slides in Russian, September 2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/mkb.pdf) | @@ -159,5 +160,6 @@ toc_title: Adopters | ChelPipe Group | Analytics | — | — | — | [Blog post, June 2021](https://vc.ru/trade/253172-tyazhelomu-proizvodstvu-user-friendly-sayt-internet-magazin-trub-dlya-chtpz) | | Zagrava Trading | — | — | — | — | [Job offer, May 2021](https://twitter.com/datastackjobs/status/1394707267082063874) | | Beeline | Telecom | Data Platform | — | — | [Blog post, July 2021](https://habr.com/en/company/beeline/blog/567508/) | +| Ecommpay | Payment Processing | Logs | — | — | [Video, Nov 2019](https://www.youtube.com/watch?v=d3GdZTOWGLk) | -[Original article](https://clickhouse.tech/docs/en/introduction/adopters/) +[Original article](https://clickhouse.com/docs/en/introduction/adopters/) diff --git a/docs/en/introduction/distinctive-features.md b/docs/en/introduction/distinctive-features.md index ee9f9484c67..34ba4b89415 100644 --- a/docs/en/introduction/distinctive-features.md +++ b/docs/en/introduction/distinctive-features.md @@ -93,4 +93,4 @@ ClickHouse implements user account management using SQL queries and allows for [ 2. Lack of ability to modify or delete already inserted data with a high rate and low latency. There are batch deletes and updates available to clean up or modify data, for example, to comply with [GDPR](https://gdpr-info.eu). 3. The sparse index makes ClickHouse not so efficient for point queries retrieving single rows by their keys. -[Original article](https://clickhouse.tech/docs/en/introduction/distinctive-features/) +[Original article](https://clickhouse.com/docs/en/introduction/distinctive-features/) diff --git a/docs/en/introduction/history.md b/docs/en/introduction/history.md index 247c4afc375..d192eff80ea 100644 --- a/docs/en/introduction/history.md +++ b/docs/en/introduction/history.md @@ -51,4 +51,4 @@ OLAPServer worked well for non-aggregated data, but it had many restrictions tha The initial goal for ClickHouse was to remove the limitations of OLAPServer and solve the problem of working with non-aggregated data for all reports, but over the years, it has grown into a general-purpose database management system suitable for a wide range of analytical tasks. -[Original article](https://clickhouse.tech/docs/en/introduction/history/) +[Original article](https://clickhouse.com/docs/en/introduction/history/) diff --git a/docs/en/introduction/info.md b/docs/en/introduction/info.md deleted file mode 100644 index a397c40950d..00000000000 --- a/docs/en/introduction/info.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -toc_priority: 100 ---- - -# Information support {#information-support} - -- Email address: -- Phone: +7-495-780-6510 - -[Original article](https://clickhouse.tech/docs/en/introduction/info/) \ No newline at end of file diff --git a/docs/en/introduction/performance.md b/docs/en/introduction/performance.md index 6e5710347a1..6ae37086181 100644 --- a/docs/en/introduction/performance.md +++ b/docs/en/introduction/performance.md @@ -5,9 +5,9 @@ toc_title: Performance # Performance {#performance} -According to internal testing results at Yandex, ClickHouse shows the best performance (both the highest throughput for long queries and the lowest latency on short queries) for comparable operating scenarios among systems of its class that were available for testing. You can view the test results on a [separate page](https://clickhouse.tech/benchmark/dbms/). +According to internal testing results at Yandex, ClickHouse shows the best performance (both the highest throughput for long queries and the lowest latency on short queries) for comparable operating scenarios among systems of its class that were available for testing. You can view the test results on a [separate page](https://clickhouse.com/benchmark/dbms/). -Numerous independent benchmarks came to similar conclusions. They are not difficult to find using an internet search, or you can see [our small collection of related links](https://clickhouse.tech/#independent-benchmarks). +Numerous independent benchmarks came to similar conclusions. They are not difficult to find using an internet search, or you can see [our small collection of related links](https://clickhouse.com/#independent-benchmarks). ## Throughput for a Single Large Query {#throughput-for-a-single-large-query} @@ -27,4 +27,4 @@ Under the same conditions, ClickHouse can handle several hundred queries per sec We recommend inserting data in packets of at least 1000 rows, or no more than a single request per second. When inserting to a MergeTree table from a tab-separated dump, the insertion speed can be from 50 to 200 MB/s. If the inserted rows are around 1 KB in size, the speed will be from 50,000 to 200,000 rows per second. If the rows are small, the performance can be higher in rows per second (on Banner System data -`>` 500,000 rows per second; on Graphite data -`>` 1,000,000 rows per second). To improve performance, you can make multiple INSERT queries in parallel, which scales linearly. -{## [Original article](https://clickhouse.tech/docs/en/introduction/performance/) ##} +{## [Original article](https://clickhouse.com/docs/en/introduction/performance/) ##} diff --git a/docs/en/operations/access-rights.md b/docs/en/operations/access-rights.md index 8d48218f417..52f7fb87ffd 100644 --- a/docs/en/operations/access-rights.md +++ b/docs/en/operations/access-rights.md @@ -149,4 +149,4 @@ Management queries: By default, SQL-driven access control and account management is disabled for all users. You need to configure at least one user in the `users.xml` configuration file and set the value of the [access_management](../operations/settings/settings-users.md#access_management-user-setting) setting to 1. -[Original article](https://clickhouse.tech/docs/en/operations/access_rights/) +[Original article](https://clickhouse.com/docs/en/operations/access_rights/) diff --git a/docs/en/operations/backup.md b/docs/en/operations/backup.md index 9c8f5389ccd..7f0ed48928a 100644 --- a/docs/en/operations/backup.md +++ b/docs/en/operations/backup.md @@ -37,4 +37,4 @@ For more information about queries related to partition manipulations, see the [ A third-party tool is available to automate this approach: [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup). -[Original article](https://clickhouse.tech/docs/en/operations/backup/) +[Original article](https://clickhouse.com/docs/en/operations/backup/) diff --git a/docs/en/operations/caches.md b/docs/en/operations/caches.md index ec7e4239a9d..279204a8af1 100644 --- a/docs/en/operations/caches.md +++ b/docs/en/operations/caches.md @@ -26,4 +26,4 @@ Indirectly used: To drop cache, use [SYSTEM DROP ... CACHE](../sql-reference/statements/system.md) statements. -[Original article](https://clickhouse.tech/docs/en/operations/caches/) +[Original article](https://clickhouse.com/docs/en/operations/caches/) diff --git a/docs/en/operations/clickhouse-keeper.md b/docs/en/operations/clickhouse-keeper.md index 389cf2361f8..58c59ce9f79 100644 --- a/docs/en/operations/clickhouse-keeper.md +++ b/docs/en/operations/clickhouse-keeper.md @@ -3,58 +3,58 @@ toc_priority: 66 toc_title: ClickHouse Keeper --- -# [pre-production] clickhouse-keeper +# [pre-production] ClickHouse Keeper -ClickHouse server use [ZooKeeper](https://zookeeper.apache.org/) coordination system for data [replication](../engines/table-engines/mergetree-family/replication.md) and [distributed DDL](../sql-reference/distributed-ddl.md) queries execution. ClickHouse Keeper is an alternative coordination system compatible with ZooKeeper. +ClickHouse server uses [ZooKeeper](https://zookeeper.apache.org/) coordination system for data [replication](../engines/table-engines/mergetree-family/replication.md) and [distributed DDL](../sql-reference/distributed-ddl.md) queries execution. ClickHouse Keeper is an alternative coordination system compatible with ZooKeeper. !!! warning "Warning" - This feature currently in pre-production stage. We test it in our CI and on small internal installations. + This feature is currently in the pre-production stage. We test it in our CI and on small internal installations. ## Implementation details -ZooKeeper is one of the first well-known open-source coordination systems. It's implemented in Java, has quite a simple and powerful data model. ZooKeeper's coordination algorithm called ZAB (ZooKeeper Atomic Broadcast) doesn't provide linearizability guarantees for reads, because each ZooKeeper node serves reads locally. Unlike ZooKeeper `clickhouse-keeper` written in C++ and use [RAFT algorithm](https://raft.github.io/) [implementation](https://github.com/eBay/NuRaft). This algorithm allows to have linearizability for reads and writes, has several open-source implementations in different languages. +ZooKeeper is one of the first well-known open-source coordination systems. It's implemented in Java, has quite a simple and powerful data model. ZooKeeper's coordination algorithm called ZAB (ZooKeeper Atomic Broadcast) doesn't provide linearizability guarantees for reads, because each ZooKeeper node serves reads locally. Unlike ZooKeeper ClickHouse Keeper is written in C++ and uses [RAFT algorithm](https://raft.github.io/) [implementation](https://github.com/eBay/NuRaft). This algorithm allows to have linearizability for reads and writes, has several open-source implementations in different languages. -By default, `clickhouse-keeper` provides the same guarantees as ZooKeeper (linearizable writes, non-linearizable reads). It has a compatible client-server protocol, so any standard ZooKeeper client can be used to interact with `clickhouse-keeper`. Snapshots and logs have an incompatible format with ZooKeeper, but `clickhouse-keeper-converter` tool allows to convert ZooKeeper data to `clickhouse-keeper` snapshot. Interserver protocol in `clickhouse-keeper` also incompatible with ZooKeeper so mixed ZooKeeper/clickhouse-keeper cluster is impossible. +By default, ClickHouse Keeper provides the same guarantees as ZooKeeper (linearizable writes, non-linearizable reads). It has a compatible client-server protocol, so any standard ZooKeeper client can be used to interact with ClickHouse Keeper. Snapshots and logs have an incompatible format with ZooKeeper, but `clickhouse-keeper-converter` tool allows to convert ZooKeeper data to ClickHouse Keeper snapshot. Interserver protocol in ClickHouse Keeper is also incompatible with ZooKeeper so mixed ZooKeeper / ClickHouse Keeper cluster is impossible. ## Configuration -`clickhouse-keeper` can be used as a standalone replacement for ZooKeeper or as an internal part of the `clickhouse-server`, but in both cases configuration is almost the same `.xml` file. The main `clickhouse-keeper` configuration tag is ``. Keeper configuration has the following parameters: +ClickHouse Keeper can be used as a standalone replacement for ZooKeeper or as an internal part of the ClickHouse server, but in both cases configuration is almost the same `.xml` file. The main ClickHouse Keeper configuration tag is ``. Keeper configuration has the following parameters: -- `tcp_port` — the port for a client to connect (default for ZooKeeper is `2181`) -- `tcp_port_secure` — the secure port for a client to connect -- `server_id` — unique server id, each participant of the clickhouse-keeper cluster must have a unique number (1, 2, 3, and so on) -- `log_storage_path` — path to coordination logs, better to store logs on the non-busy device (same for ZooKeeper) -- `snapshot_storage_path` — path to coordination snapshots +- `tcp_port` — Port for a client to connect (default for ZooKeeper is `2181`). +- `tcp_port_secure` — Secure port for a client to connect. +- `server_id` — Unique server id, each participant of the ClickHouse Keeper cluster must have a unique number (1, 2, 3, and so on). +- `log_storage_path` — Path to coordination logs, better to store logs on the non-busy device (same for ZooKeeper). +- `snapshot_storage_path` — Path to coordination snapshots. -Other common parameters are inherited from clickhouse-server config (`listen_host`, `logger` and so on). +Other common parameters are inherited from the ClickHouse server config (`listen_host`, `logger`, and so on). Internal coordination settings are located in `.` section: -- `operation_timeout_ms` — timeout for a single client operation (default: 10000) -- `session_timeout_ms` — timeout for client session (default: 30000) -- `dead_session_check_period_ms` — how often clickhouse-keeper check dead sessions and remove them (default: 500) -- `heart_beat_interval_ms` — how often a clickhouse-keeper leader will send heartbeats to followers (default: 500) -- `election_timeout_lower_bound_ms` — if follower didn't receive heartbeats from the leader in this interval, then it can initiate leader election (default: 1000) -- `election_timeout_upper_bound_ms` — if follower didn't receive heartbeats from the leader in this interval, then it must initiate leader election (default: 2000) -- `rotate_log_storage_interval` — how many log records to store in a single file (default: 100000) -- `reserved_log_items` — how many coordination log records to store before compaction (default: 100000) -- `snapshot_distance` — how often clickhouse-keeper will create new snapshots (in the number of records in logs) (default: 100000) -- `snapshots_to_keep` — how many snapshots to keep (default: 3) -- `stale_log_gap` — the threshold when leader consider follower as stale and send snapshot to it instead of logs (default: 10000) -- `fresh_log_gap` - when node became fresh (default: 200) -- `max_requests_batch_size` - max size of batch in requests count before it will be sent to RAFT (default: 100) -- `force_sync` — call `fsync` on each write to coordination log (default: true) -- `quorum_reads` - execute read requests as writes through whole RAFT consesus with similar speed (default: false) -- `raft_logs_level` — text logging level about coordination (trace, debug, and so on) (default: system default) -- `auto_forwarding` - allow to forward write requests from followers to leader (default: true) -- `shutdown_timeout` — wait to finish internal connections and shutdown (ms) (default: 5000) -- `startup_timeout` — if the server doesn't connect to other quorum participants in the specified timeout it will terminate (ms) (default: 30000) +- `operation_timeout_ms` — Timeout for a single client operation (ms) (default: 10000). +- `session_timeout_ms` — Timeout for client session (ms) (default: 30000). +- `dead_session_check_period_ms` — How often ClickHouse Keeper check dead sessions and remove them (ms) (default: 500). +- `heart_beat_interval_ms` — How often a ClickHouse Keeper leader will send heartbeats to followers (ms) (default: 500). +- `election_timeout_lower_bound_ms` — If the follower didn't receive heartbeats from the leader in this interval, then it can initiate leader election (default: 1000). +- `election_timeout_upper_bound_ms` — If the follower didn't receive heartbeats from the leader in this interval, then it must initiate leader election (default: 2000). +- `rotate_log_storage_interval` — How many log records to store in a single file (default: 100000). +- `reserved_log_items` — How many coordination log records to store before compaction (default: 100000). +- `snapshot_distance` — How often ClickHouse Keeper will create new snapshots (in the number of records in logs) (default: 100000). +- `snapshots_to_keep` — How many snapshots to keep (default: 3). +- `stale_log_gap` — Threshold when leader considers follower as stale and sends the snapshot to it instead of logs (default: 10000). +- `fresh_log_gap` — When node became fresh (default: 200). +- `max_requests_batch_size` - Max size of batch in requests count before it will be sent to RAFT (default: 100). +- `force_sync` — Call `fsync` on each write to coordination log (default: true). +- `quorum_reads` — Execute read requests as writes through whole RAFT consensus with similar speed (default: false). +- `raft_logs_level` — Text logging level about coordination (trace, debug, and so on) (default: system default). +- `auto_forwarding` — Allow to forward write requests from followers to the leader (default: true). +- `shutdown_timeout` — Wait to finish internal connections and shutdown (ms) (default: 5000). +- `startup_timeout` — If the server doesn't connect to other quorum participants in the specified timeout it will terminate (ms) (default: 30000). Quorum configuration is located in `.` section and contain servers description. The only parameter for the whole quorum is `secure`, which enables encrypted connection for communication between quorum participants. The main parameters for each `` are: -- `id` — server_id in quorum -- `hostname` — hostname where this server placed -- `port` — port where this server listen for connections +- `id` — Server identifier in a quorum. +- `hostname` — Hostname where this server is placed. +- `port` — Port where this server listens for connections. Examples of configuration for quorum with three nodes can be found in [integration tests](https://github.com/ClickHouse/ClickHouse/tree/master/tests/integration) with `test_keeper_` prefix. Example configuration for server #1: @@ -94,7 +94,7 @@ Examples of configuration for quorum with three nodes can be found in [integrati ## How to run -`clickhouse-keeper` is bundled into `clickhouse-server` package, just add configuration of `` and start clickhouse-server as always. If you want to run standalone `clickhouse-keeper` you can start it in a similar way with: +ClickHouse Keeper is bundled into the ClickHouse server package, just add configuration of `` and start ClickHouse server as always. If you want to run standalone ClickHouse Keeper you can start it in a similar way with: ```bash clickhouse-keeper --config /etc/your_path_to_config/config.xml --daemon @@ -102,17 +102,18 @@ clickhouse-keeper --config /etc/your_path_to_config/config.xml --daemon ## [experimental] Migration from ZooKeeper -Seamlessly migration from ZooKeeper to `clickhouse-keeper` is impossible you have to stop your ZooKeeper cluster, convert data and start `clickhouse-keeper`. `clickhouse-keeper-converter` tool allows to convert ZooKeeper logs and snapshots to `clickhouse-keeper` snapshot. It works only with ZooKeeper > 3.4. Steps for migration: +Seamlessly migration from ZooKeeper to ClickHouse Keeper is impossible you have to stop your ZooKeeper cluster, convert data and start ClickHouse Keeper. `clickhouse-keeper-converter` tool allows converting ZooKeeper logs and snapshots to ClickHouse Keeper snapshot. It works only with ZooKeeper > 3.4. Steps for migration: 1. Stop all ZooKeeper nodes. -2. [optional, but recommended] Found ZooKeeper leader node, start and stop it again. It will force ZooKeeper to create consistent snapshot. +2. Optional, but recommended: find ZooKeeper leader node, start and stop it again. It will force ZooKeeper to create a consistent snapshot. -3. Run `clickhouse-keeper-converter` on leader, example +3. Run `clickhouse-keeper-converter` on a leader, for example: ```bash clickhouse-keeper-converter --zookeeper-logs-dir /var/lib/zookeeper/version-2 --zookeeper-snapshots-dir /var/lib/zookeeper/version-2 --output-dir /path/to/clickhouse/keeper/snapshots ``` -4. Copy snapshot to `clickhouse-server` nodes with configured `keeper` or start `clickhouse-keeper` instead of ZooKeeper. Snapshot must persist on all nodes, otherwise empty nodes can be faster and one of them can becamse leader. +4. Copy snapshot to ClickHouse server nodes with a configured `keeper` or start ClickHouse Keeper instead of ZooKeeper. The snapshot must persist on all nodes, otherwise, empty nodes can be faster and one of them can become a leader. +[Original article](https://clickhouse.com/docs/en/operations/clickhouse-keeper/) diff --git a/docs/en/operations/configuration-files.md b/docs/en/operations/configuration-files.md index 44f9353063c..f5073afcc23 100644 --- a/docs/en/operations/configuration-files.md +++ b/docs/en/operations/configuration-files.md @@ -7,7 +7,7 @@ toc_title: Configuration Files ClickHouse supports multi-file configuration management. The main server configuration file is `/etc/clickhouse-server/config.xml` or `/etc/clickhouse-server/config.yaml`. Other files must be in the `/etc/clickhouse-server/config.d` directory. Note, that any configuration file can be written either in XML or YAML, but mixing formats in one file is not supported. For example, you can have main configs as `config.xml` and `users.xml` and write additional files in `config.d` and `users.d` directories in `.yaml`. -All the configuration files should be in XML or YAML formats. All XML files should have the same root element, usually ``. As for YAML, `yandex:` should not be present, the parser will insert it automatically. +All XML files should have the same root element, usually ``. As for YAML, `yandex:` should not be present, the parser will insert it automatically. ## Override {#override} @@ -32,7 +32,7 @@ You can also declare attributes as coming from environment variables by using `f ## Substitution {#substitution} -The config can also define “substitutions”. If an element has the `incl` attribute, the corresponding substitution from the file will be used as the value. By default, the path to the file with substitutions is `/etc/metrika.xml`. This can be changed in the [include_from](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-include_from) element in the server config. The substitution values are specified in `/yandex/substitution_name` elements in this file. If a substitution specified in `incl` does not exist, it is recorded in the log. To prevent ClickHouse from logging missing substitutions, specify the `optional="true"` attribute (for example, settings for [macros](../operations/server-configuration-parameters/settings.md)). +The config can also define “substitutions”. If an element has the `incl` attribute, the corresponding substitution from the file will be used as the value. By default, the path to the file with substitutions is `/etc/metrika.xml`. This can be changed in the [include_from](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-include_from) element in the server config. The substitution values are specified in `/clickhouse/substitution_name` elements in this file. If a substitution specified in `incl` does not exist, it is recorded in the log. To prevent ClickHouse from logging missing substitutions, specify the `optional="true"` attribute (for example, settings for [macros](../operations/server-configuration-parameters/settings.md#macros)). If you want to replace an entire element with a substitution use `include` as element name. @@ -156,4 +156,4 @@ For each config file, the server also generates `file-preprocessed.xml` files wh The server tracks changes in config files, as well as files and ZooKeeper nodes that were used when performing substitutions and overrides, and reloads the settings for users and clusters on the fly. This means that you can modify the cluster, users, and their settings without restarting the server. -[Original article](https://clickhouse.tech/docs/en/operations/configuration-files/) +[Original article](https://clickhouse.com/docs/en/operations/configuration-files/) diff --git a/docs/en/operations/external-authenticators/index.md b/docs/en/operations/external-authenticators/index.md index aa220f50ef8..13b07b8e51e 100644 --- a/docs/en/operations/external-authenticators/index.md +++ b/docs/en/operations/external-authenticators/index.md @@ -13,4 +13,4 @@ The following external authenticators and directories are supported: - [LDAP](./ldap.md#external-authenticators-ldap) [Authenticator](./ldap.md#ldap-external-authenticator) and [Directory](./ldap.md#ldap-external-user-directory) - Kerberos [Authenticator](./kerberos.md#external-authenticators-kerberos) -[Original article](https://clickhouse.tech/docs/en/operations/external-authenticators/index/) +[Original article](https://clickhouse.com/docs/en/operations/external-authenticators/index/) diff --git a/docs/en/operations/external-authenticators/ldap.md b/docs/en/operations/external-authenticators/ldap.md index 5a3db6faf55..c33700f0e31 100644 --- a/docs/en/operations/external-authenticators/ldap.md +++ b/docs/en/operations/external-authenticators/ldap.md @@ -179,4 +179,4 @@ Note that `my_ldap_server` referred in the `ldap` section inside the `user_direc - `attribute` — Attribute name whose values will be returned by the LDAP search. `cn`, by default. - `prefix` — Prefix, that will be expected to be in front of each string in the original list of strings returned by the LDAP search. The prefix will be removed from the original strings and the resulting strings will be treated as local role names. Empty by default. -[Original article](https://clickhouse.tech/docs/en/operations/external-authenticators/ldap/) +[Original article](https://clickhouse.com/docs/en/operations/external-authenticators/ldap/) diff --git a/docs/en/operations/index.md b/docs/en/operations/index.md index 3364598ebc2..b78633f2d6b 100644 --- a/docs/en/operations/index.md +++ b/docs/en/operations/index.md @@ -23,4 +23,4 @@ ClickHouse operations manual consists of the following major sections: - [Settings](../operations/settings/index.md) - [Utilities](../operations/utilities/index.md) -{## [Original article](https://clickhouse.tech/docs/en/operations/) ##} +{## [Original article](https://clickhouse.com/docs/en/operations/) ##} diff --git a/docs/en/operations/opentelemetry.md b/docs/en/operations/opentelemetry.md index 74c9c6dd18f..6dac8736372 100644 --- a/docs/en/operations/opentelemetry.md +++ b/docs/en/operations/opentelemetry.md @@ -61,4 +61,4 @@ FROM system.opentelemetry_span_log In case of any errors, the part of the log data for which the error has occurred will be silently lost. Check the server log for error messages if the data does not arrive. -[Original article](https://clickhouse.tech/docs/en/operations/opentelemetry/) +[Original article](https://clickhouse.com/docs/en/operations/opentelemetry/) diff --git a/docs/en/operations/performance-test.md b/docs/en/operations/performance-test.md index d6d9cdb55cc..2880793962a 100644 --- a/docs/en/operations/performance-test.md +++ b/docs/en/operations/performance-test.md @@ -25,7 +25,7 @@ chmod a+x ./hardware.sh 3. Copy the output and send it to clickhouse-feedback@yandex-team.com -All the results are published here: https://clickhouse.tech/benchmark/hardware/ +All the results are published here: https://clickhouse.com/benchmark/hardware/ ## Manual Run @@ -35,9 +35,9 @@ Alternatively you can perform benchmark in the following steps. 1. ssh to the server and download the binary with wget: ```bash # For amd64: -wget https://builds.clickhouse.tech/master/amd64/clickhouse +wget https://builds.clickhouse.com/master/amd64/clickhouse # For aarch64: -wget https://builds.clickhouse.tech/master/aarch64/clickhouse +wget https://builds.clickhouse.com/master/aarch64/clickhouse # Then do: chmod a+x clickhouse ``` @@ -49,7 +49,7 @@ wget https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/benchmark/cl ``` 3. Download test data according to the [Yandex.Metrica dataset](../getting-started/example-datasets/metrica.md) instruction (“hits” table containing 100 million rows). ```bash -wget https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz +wget https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz tar xvf hits_100m_obfuscated_v1.tar.xz -C . mv hits_100m_obfuscated_v1/* . ``` @@ -68,4 +68,4 @@ mv hits_100m_obfuscated_v1/* . ``` 7. Send the numbers and the info about your hardware configuration to clickhouse-feedback@yandex-team.com -All the results are published here: https://clickhouse.tech/benchmark/hardware/ +All the results are published here: https://clickhouse.com/benchmark/hardware/ diff --git a/docs/en/operations/quotas.md b/docs/en/operations/quotas.md index bbea735cdba..eec8961b595 100644 --- a/docs/en/operations/quotas.md +++ b/docs/en/operations/quotas.md @@ -117,4 +117,4 @@ For distributed query processing, the accumulated amounts are stored on the requ When the server is restarted, quotas are reset. -[Original article](https://clickhouse.tech/docs/en/operations/quotas/) +[Original article](https://clickhouse.com/docs/en/operations/quotas/) diff --git a/docs/en/operations/server-configuration-parameters/index.md b/docs/en/operations/server-configuration-parameters/index.md index 02bbe7362cf..a95d198bd0d 100644 --- a/docs/en/operations/server-configuration-parameters/index.md +++ b/docs/en/operations/server-configuration-parameters/index.md @@ -14,4 +14,4 @@ Other settings are described in the “[Settings](../../operations/settings/inde Before studying the settings, read the [Configuration files](../../operations/configuration-files.md#configuration_files) section and note the use of substitutions (the `incl` and `optional` attributes). -[Original article](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/) +[Original article](https://clickhouse.com/docs/en/operations/server_configuration_parameters/) diff --git a/docs/en/operations/server-configuration-parameters/settings.md b/docs/en/operations/server-configuration-parameters/settings.md index 66a2bde4b4b..eec034e2d42 100644 --- a/docs/en/operations/server-configuration-parameters/settings.md +++ b/docs/en/operations/server-configuration-parameters/settings.md @@ -45,7 +45,7 @@ Configuration template: - `min_part_size` – The minimum size of a data part. - `min_part_size_ratio` – The ratio of the data part size to the table size. - `method` – Compression method. Acceptable values: `lz4`, `lz4hc`, `zstd`. -- `level` – Compression level. See [Codecs](../../sql-reference/statements/create/table/#create-query-general-purpose-codecs). +- `level` – Compression level. See [Codecs](../../sql-reference/statements/create/table.md#create-query-general-purpose-codecs). You can configure multiple `` sections. @@ -69,29 +69,85 @@ If no conditions met for a data part, ClickHouse uses the `lz4` compression. ``` - + +Load key from environment variable: + +```xml + + + + + +``` + +Where `current_key_id` sets the current key for encryption, and all specified keys can be used for decryption. + +All this methods can be applied for multiple keys: + +```xml + + + 00112233445566778899aabbccddeeff + + 1 + + +``` + +Where `current_key_id` shows current key for encryption. + +Also user can add nonce that must be 12 bytes long (by default encryption and decryption will use nonce consisting of zero bytes): + +```xml + + + 0123456789101 + + +``` + +Or it can be set in hex: + +```xml + + + abcdefabcdef + + +``` + +Everything above can be applied for `aes_256_gcm_siv` (but key must be 32 bytes length). + ## custom_settings_prefixes {#custom_settings_prefixes} List of prefixes for [custom settings](../../operations/settings/index.md#custom_settings). The prefixes must be separated with commas. @@ -126,6 +182,7 @@ Default value: `1073741824` (1 GB). 1073741824 ``` + ## database_atomic_delay_before_drop_table_sec {#database_atomic_delay_before_drop_table_sec} Sets the delay before remove table data in seconds. If the query has `SYNC` modifier, this setting is ignored. @@ -390,12 +447,12 @@ This section contains the following parameters: ## keep_alive_timeout {#keep-alive-timeout} -The number of seconds that ClickHouse waits for incoming requests before closing the connection. Defaults to 3 seconds. +The number of seconds that ClickHouse waits for incoming requests before closing the connection. Defaults to 10 seconds. **Example** ``` xml -3 +10 ``` ## listen_host {#server_configuration_parameters-listen_host} @@ -535,7 +592,7 @@ Possible values: - Positive double. - 0 — The ClickHouse server can use all available RAM. -Default value: `0`. +Default value: `0.9`. **Usage** @@ -805,7 +862,7 @@ Use the following parameters to configure logging: The path to the directory containing data. -!!! note "Note" +!!! warning "Warning" The trailing slash is mandatory. **Example** @@ -894,9 +951,9 @@ If the table does not exist, ClickHouse will create it. If the structure of the ## query_views_log {#server_configuration_parameters-query_views_log} -Setting for logging views dependant of queries received with the [log_query_views=1](../../operations/settings/settings.md#settings-log-query-views) setting. +Setting for logging views (live, materialized etc) dependant of queries received with the [log_query_views=1](../../operations/settings/settings.md#settings-log-query-views) setting. -Queries are logged in the [system.query_views_log](../../operations/system-tables/query_thread_log.md#system_tables-query_views_log) table, not in a separate file. You can change the name of the table in the `table` parameter (see below). +Queries are logged in the [system.query_views_log](../../operations/system-tables/query_views_log.md#system_tables-query_views_log) table, not in a separate file. You can change the name of the table in the `table` parameter (see below). Use the following parameters to configure logging: @@ -974,8 +1031,7 @@ The default server configuration file `config.xml` contains the following settin Regexp-based rules, which will be applied to queries as well as all log messages before storing them in server logs, `system.query_log`, `system.text_log`, `system.processes` tables, and in logs sent to the client. That allows preventing -sensitive data leakage from SQL queries (like names, emails, personal -identifiers or credit card numbers) to logs. +sensitive data leakage from SQL queries (like names, emails, personal identifiers or credit card numbers) to logs. **Example** @@ -1073,7 +1129,7 @@ Example Path to temporary data for processing large queries. -!!! note "Note" +!!! warning "Note" The trailing slash is mandatory. **Example** @@ -1090,9 +1146,9 @@ If not set, [tmp_path](#tmp-path) is used, otherwise it is ignored. !!! note "Note" - `move_factor` is ignored. -- `keep_free_space_bytes` is ignored. -- `max_data_part_size_bytes` is ignored. -- Уou must have exactly one volume in that policy. + - `keep_free_space_bytes` is ignored. + - `max_data_part_size_bytes` is ignored. + - Уou must have exactly one volume in that policy. ## uncompressed_cache_size {#server-settings-uncompressed_cache_size} @@ -1156,9 +1212,10 @@ This section contains the following parameters: The `index` attribute specifies the node order when trying to connect to the ZooKeeper cluster. -- `session_timeout` — Maximum timeout for the client session in milliseconds. -- `root` — The [znode](http://zookeeper.apache.org/doc/r3.5.5/zookeeperOver.html#Nodes+and+ephemeral+nodes) that is used as the root for znodes used by the ClickHouse server. Optional. -- `identity` — User and password, that can be required by ZooKeeper to give access to requested znodes. Optional. +- `session_timeout_ms` — Maximum timeout for the client session in milliseconds. +- `operation_timeout_ms` — Maximum timeout for one operation in milliseconds. +- `root` — The [znode](http://zookeeper.apache.org/doc/r3.5.5/zookeeperOver.html#Nodes+and+ephemeral+nodes) that is used as the root for znodes used by the ClickHouse server. Optional. +- `identity` — User and password, that can be required by ZooKeeper to give access to requested znodes. Optional. **Example configuration** @@ -1232,6 +1289,39 @@ The update is performed asynchronously, in a separate system thread. - [background_schedule_pool_size](../../operations/settings/settings.md#background_schedule_pool_size) +## distributed_ddl {#server-settings-distributed_ddl} + +Manage executing [distributed ddl queries](../../sql-reference/distributed-ddl.md) (CREATE, DROP, ALTER, RENAME) on cluster. +Works only if [ZooKeeper](#server-settings_zookeeper) is enabled. + +**Example** + +```xml + + + /clickhouse/task_queue/ddl + + + default + + + 1 + + + + + 604800 + + + 60 + + + 1000 + +``` + ## access_control_path {#access_control_path} Path to a folder where a ClickHouse server stores user and role configurations created by SQL commands. @@ -1240,7 +1330,7 @@ Default value: `/var/lib/clickhouse/access/`. **See also** -- [Access Control and Account Management](../../operations/access-rights.md#access-control) +- [Access Control and Account Management](../../operations/access-rights.md#access-control) ## user_directories {#user_directories} @@ -1253,7 +1343,7 @@ If this section is specified, the path from [users_config](../../operations/serv The `user_directories` section can contain any number of items, the order of the items means their precedence (the higher the item the higher the precedence). -**Example** +**Examples** ``` xml @@ -1263,13 +1353,23 @@ The `user_directories` section can contain any number of items, the order of the /var/lib/clickhouse/access/ + +``` + +Users, roles, row policies, quotas, and profiles can be also stored in ZooKeeper: + +``` xml + + + /etc/clickhouse-server/users.xml + /clickhouse/access/ ``` -You can also specify settings `memory` — means storing information only in memory, without writing to disk, and `ldap` — means storing information on an LDAP server. +You can also define sections `memory` — means storing information only in memory, without writing to disk, and `ldap` — means storing information on an LDAP server. To add an LDAP server as a remote user directory of users that are not defined locally, define a single `ldap` section with a following parameters: - `server` — one of LDAP server names defined in `ldap_servers` config section. This parameter is mandatory and cannot be empty. @@ -1287,4 +1387,4 @@ To add an LDAP server as a remote user directory of users that are not defined l ``` -[Original article](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/settings/) +[Original article](https://clickhouse.com/docs/en/operations/server_configuration_parameters/settings/) diff --git a/docs/en/operations/settings/constraints-on-settings.md b/docs/en/operations/settings/constraints-on-settings.md index 2fe75aaad58..338949c5a6a 100644 --- a/docs/en/operations/settings/constraints-on-settings.md +++ b/docs/en/operations/settings/constraints-on-settings.md @@ -70,4 +70,4 @@ Code: 452, e.displayText() = DB::Exception: Setting force_index_by_date should n **Note:** the `default` profile has special handling: all the constraints defined for the `default` profile become the default constraints, so they restrict all the users until they’re overridden explicitly for these users. -[Original article](https://clickhouse.tech/docs/en/operations/settings/constraints_on_settings/) +[Original article](https://clickhouse.com/docs/en/operations/settings/constraints_on_settings/) diff --git a/docs/en/operations/settings/index.md b/docs/en/operations/settings/index.md index b5dcef932e8..f2a6bfc515a 100644 --- a/docs/en/operations/settings/index.md +++ b/docs/en/operations/settings/index.md @@ -55,4 +55,4 @@ SELECT getSetting('custom_a'); - [Server Configuration Settings](../../operations/server-configuration-parameters/settings.md) -[Original article](https://clickhouse.tech/docs/en/operations/settings/) +[Original article](https://clickhouse.com/docs/en/operations/settings/) diff --git a/docs/en/operations/settings/merge-tree-settings.md b/docs/en/operations/settings/merge-tree-settings.md index 65d63438aea..a3a258234e1 100644 --- a/docs/en/operations/settings/merge-tree-settings.md +++ b/docs/en/operations/settings/merge-tree-settings.md @@ -181,6 +181,44 @@ Possible values: Default value: 0. +## max_replicated_fetches_network_bandwidth {#max_replicated_fetches_network_bandwidth} + +Limits the maximum speed of data exchange over the network in bytes per second for [replicated](../../engines/table-engines/mergetree-family/replication.md) fetches. This setting is applied to a particular table, unlike the [max_replicated_fetches_network_bandwidth_for_server](settings.md#max_replicated_fetches_network_bandwidth_for_server) setting, which is applied to the server. + +You can limit both server network and network for a particular table, but for this the value of the table-level setting should be less than server-level one. Otherwise the server considers only the `max_replicated_fetches_network_bandwidth_for_server` setting. + +The setting isn't followed perfectly accurately. + +Possible values: + +- Positive integer. +- 0 — Unlimited. + +Default value: `0`. + +**Usage** + +Could be used for throttling speed when replicating data to add or replace new nodes. + +## max_replicated_sends_network_bandwidth {#max_replicated_sends_network_bandwidth} + +Limits the maximum speed of data exchange over the network in bytes per second for [replicated](../../engines/table-engines/mergetree-family/replication.md) sends. This setting is applied to a particular table, unlike the [max_replicated_sends_network_bandwidth_for_server](settings.md#max_replicated_sends_network_bandwidth_for_server) setting, which is applied to the server. + +You can limit both server network and network for a particular table, but for this the value of the table-level setting should be less than server-level one. Otherwise the server considers only the `max_replicated_sends_network_bandwidth_for_server` setting. + +The setting isn't followed perfectly accurately. + +Possible values: + +- Positive integer. +- 0 — Unlimited. + +Default value: `0`. + +**Usage** + +Could be used for throttling speed when replicating data to add or replace new nodes. + ## old_parts_lifetime {#old-parts-lifetime} The time (in seconds) of storing inactive parts to protect against data loss during spontaneous server reboots. diff --git a/docs/en/operations/settings/permissions-for-queries.md b/docs/en/operations/settings/permissions-for-queries.md index 2ab13216d9e..47551f288bb 100644 --- a/docs/en/operations/settings/permissions-for-queries.md +++ b/docs/en/operations/settings/permissions-for-queries.md @@ -56,4 +56,4 @@ You can’t execute `SET allow_ddl = 1` if `allow_ddl = 0` for the current sessi Default value: 1 -[Original article](https://clickhouse.tech/docs/en/operations/settings/permissions_for_queries/) +[Original article](https://clickhouse.com/docs/en/operations/settings/permissions_for_queries/) diff --git a/docs/en/operations/settings/query-complexity.md b/docs/en/operations/settings/query-complexity.md index 236359bfe55..3287caacdf8 100644 --- a/docs/en/operations/settings/query-complexity.md +++ b/docs/en/operations/settings/query-complexity.md @@ -312,4 +312,4 @@ When inserting data, ClickHouse calculates the number of partitions in the inser > “Too many partitions for single INSERT block (more than” + toString(max_parts) + “). The limit is controlled by ‘max_partitions_per_insert_block’ setting. A large number of partitions is a common misconception. It will lead to severe negative performance impact, including slow server startup, slow INSERT queries and slow SELECT queries. Recommended total number of partitions for a table is under 1000..10000. Please note, that partitioning is not intended to speed up SELECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc).” -[Original article](https://clickhouse.tech/docs/en/operations/settings/query_complexity/) +[Original article](https://clickhouse.com/docs/en/operations/settings/query_complexity/) diff --git a/docs/en/operations/settings/settings-profiles.md b/docs/en/operations/settings/settings-profiles.md index c7a01466462..1939b21bfc3 100644 --- a/docs/en/operations/settings/settings-profiles.md +++ b/docs/en/operations/settings/settings-profiles.md @@ -76,4 +76,4 @@ The `default` profile has a special purpose: it must always be present and is ap The `web` profile is a regular profile that can be set using the `SET` query or using a URL parameter in an HTTP query. -[Original article](https://clickhouse.tech/docs/en/operations/settings/settings_profiles/) +[Original article](https://clickhouse.com/docs/en/operations/settings/settings_profiles/) diff --git a/docs/en/operations/settings/settings-users.md b/docs/en/operations/settings/settings-users.md index 2c8315ad069..1a1d2e2a0fa 100644 --- a/docs/en/operations/settings/settings-users.md +++ b/docs/en/operations/settings/settings-users.md @@ -159,4 +159,4 @@ The following configuration forces that user `user1` can only see the rows of `t The `filter` can be any expression resulting in a [UInt8](../../sql-reference/data-types/int-uint.md)-type value. It usually contains comparisons and logical operators. Rows from `database_name.table1` where filter results to 0 are not returned for this user. The filtering is incompatible with `PREWHERE` operations and disables `WHERE→PREWHERE` optimization. -[Original article](https://clickhouse.tech/docs/en/operations/settings/settings_users/) +[Original article](https://clickhouse.com/docs/en/operations/settings/settings_users/) diff --git a/docs/en/operations/settings/settings.md b/docs/en/operations/settings/settings.md index 07bfe158a0a..0e4e9d3b489 100644 --- a/docs/en/operations/settings/settings.md +++ b/docs/en/operations/settings/settings.md @@ -93,6 +93,17 @@ Works with tables in the MergeTree family. If `force_primary_key=1`, ClickHouse checks to see if the query has a primary key condition that can be used for restricting data ranges. If there is no suitable condition, it throws an exception. However, it does not check whether the condition reduces the amount of data to read. For more information about data ranges in MergeTree tables, see [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md). +## use_skip_indexes {#settings-use_skip_indexes} + +Use data skipping indexes during query execution. + +Possible values: + +- 0 — Disabled. +- 1 — Enabled. + +Default value: 1. + ## force_data_skipping_indices {#settings-force_data_skipping_indices} Disables query execution if passed data skipping indices wasn't used. @@ -260,6 +271,39 @@ If an error occurred while reading rows but the error counter is still less than If both `input_format_allow_errors_num` and `input_format_allow_errors_ratio` are exceeded, ClickHouse throws an exception. +## input_format_parquet_import_nested {#input_format_parquet_import_nested} + +Enables or disables the ability to insert the data into [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs in [Parquet](../../interfaces/formats.md#data-format-parquet) input format. + +Possible values: + +- 0 — Data can not be inserted into `Nested` columns as an array of structs. +- 1 — Data can be inserted into `Nested` columns as an array of structs. + +Default value: `0`. + +## input_format_arrow_import_nested {#input_format_arrow_import_nested} + +Enables or disables the ability to insert the data into [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs in [Arrow](../../interfaces/formats.md#data_types-matching-arrow) input format. + +Possible values: + +- 0 — Data can not be inserted into `Nested` columns as an array of structs. +- 1 — Data can be inserted into `Nested` columns as an array of structs. + +Default value: `0`. + +## input_format_orc_import_nested {#input_format_orc_import_nested} + +Enables or disables the ability to insert the data into [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) columns as an array of structs in [ORC](../../interfaces/formats.md#data-format-orc) input format. + +Possible values: + +- 0 — Data can not be inserted into `Nested` columns as an array of structs. +- 1 — Data can be inserted into `Nested` columns as an array of structs. + +Default value: `0`. + ## input_format_values_interpret_expressions {#settings-input_format_values_interpret_expressions} Enables or disables the full SQL parser if the fast stream parser can’t parse the data. This setting is used only for the [Values](../../interfaces/formats.md#data-format-values) format at the data insertion. For more information about syntax parsing, see the [Syntax](../../sql-reference/syntax.md) section. @@ -777,7 +821,7 @@ If ClickHouse should read more than `merge_tree_max_bytes_to_use_cache` bytes in The cache of uncompressed blocks stores data extracted for queries. ClickHouse uses this cache to speed up responses to repeated small queries. This setting protects the cache from trashing by queries that read a large amount of data. The [uncompressed_cache_size](../../operations/server-configuration-parameters/settings.md#server-settings-uncompressed_cache_size) server setting defines the size of the cache of uncompressed blocks. -Possible value: +Possible values: - Any positive integer. @@ -785,23 +829,23 @@ Default value: 2013265920. ## merge_tree_clear_old_temporary_directories_interval_seconds {#setting-merge-tree-clear-old-temporary-directories-interval-seconds} -The interval in seconds for ClickHouse to execute the cleanup old temporary directories. +Sets the interval in seconds for ClickHouse to execute the cleanup of old temporary directories. -Possible value: +Possible values: - Any positive integer. -Default value: 60. +Default value: `60` seconds. ## merge_tree_clear_old_parts_interval_seconds {#setting-merge-tree-clear-old-parts-interval-seconds} -The interval in seconds for ClickHouse to execute the cleanup old parts, WALs, and mutations. +Sets the interval in seconds for ClickHouse to execute the cleanup of old parts, WALs, and mutations. -Possible value: +Possible values: - Any positive integer. -Default value: 1. +Default value: `1` second. ## min_bytes_to_use_direct_io {#settings-min-bytes-to-use-direct-io} @@ -1107,6 +1151,40 @@ Possible values: Default value: `5`. +## max_replicated_fetches_network_bandwidth_for_server {#max_replicated_fetches_network_bandwidth_for_server} + +Limits the maximum speed of data exchange over the network in bytes per second for [replicated](../../engines/table-engines/mergetree-family/replication.md) fetches for the server. Only has meaning at server startup. You can also limit the speed for a particular table with [max_replicated_fetches_network_bandwidth](../../operations/settings/merge-tree-settings.md#max_replicated_fetches_network_bandwidth) setting. + +The setting isn't followed perfectly accurately. + +Possible values: + +- Positive integer. +- 0 — Unlimited. + +Default value: `0`. + +**Usage** + +Could be used for throttling speed when replicating the data to add or replace new nodes. + +## max_replicated_sends_network_bandwidth_for_server {#max_replicated_sends_network_bandwidth_for_server} + +Limits the maximum speed of data exchange over the network in bytes per second for [replicated](../../engines/table-engines/mergetree-family/replication.md) sends for the server. Only has meaning at server startup. You can also limit the speed for a particular table with [max_replicated_sends_network_bandwidth](../../operations/settings/merge-tree-settings.md#max_replicated_sends_network_bandwidth) setting. + +The setting isn't followed perfectly accurately. + +Possible values: + +- Positive integer. +- 0 — Unlimited. + +Default value: `0`. + +**Usage** + +Could be used for throttling speed when replicating the data to add or replace new nodes. + ## connect_timeout_with_failover_ms {#connect-timeout-with-failover-ms} The timeout in milliseconds for connecting to a remote server for a Distributed table engine, if the ‘shard’ and ‘replica’ sections are used in the cluster definition. @@ -2041,10 +2119,25 @@ Default value: 0. ## input_format_parallel_parsing {#input-format-parallel-parsing} -- Type: bool -- Default value: True +Enables or disables order-preserving parallel parsing of data formats. Supported only for [TSV](../../interfaces/formats.md#tabseparated), [TKSV](../../interfaces/formats.md#tskv), [CSV](../../interfaces/formats.md#csv) and [JSONEachRow](../../interfaces/formats.md#jsoneachrow) formats. -Enable order-preserving parallel parsing of data formats. Supported only for TSV, TKSV, CSV, and JSONEachRow formats. +Possible values: + +- 1 — Enabled. +- 0 — Disabled. + +Default value: `0`. + +## output_format_parallel_formatting {#output-format-parallel-formatting} + +Enables or disables parallel formatting of data formats. Supported only for [TSV](../../interfaces/formats.md#tabseparated), [TKSV](../../interfaces/formats.md#tskv), [CSV](../../interfaces/formats.md#csv) and [JSONEachRow](../../interfaces/formats.md#jsoneachrow) formats. + +Possible values: + +- 1 — Enabled. +- 0 — Disabled. + +Default value: `0`. ## min_chunk_bytes_for_parallel_parsing {#min-chunk-bytes-for-parallel-parsing} @@ -2751,6 +2844,43 @@ Possible values: Default value: `1`. +## output_format_csv_null_representation {#output_format_csv_null_representation} + +Defines the representation of `NULL` for [CSV](../../interfaces/formats.md#csv) output format. User can set any string as a value, for example, `My NULL`. + +Default value: `\N`. + +**Examples** + +Query + +```sql +SELECT * from csv_custom_null FORMAT CSV; +``` + +Result + +```text +788 +\N +\N +``` + +Query + +```sql +SET output_format_csv_null_representation = 'My NULL'; +SELECT * FROM csv_custom_null FORMAT CSV; +``` + +Result + +```text +788 +My NULL +My NULL +``` + ## output_format_tsv_null_representation {#output_format_tsv_null_representation} Defines the representation of `NULL` for [TSV](../../interfaces/formats.md#tabseparated) output format. User can set any string as a value, for example, `My NULL`. @@ -3224,7 +3354,7 @@ Result: └─────┘ ``` -## optimize_fuse_sum_count_avg {#optimize_fuse_sum_count_avg} +## optimize_syntax_fuse_functions {#optimize_syntax_fuse_functions} Enables to fuse aggregate functions with identical argument. It rewrites query contains at least two aggregate functions from [sum](../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum), [count](../../sql-reference/aggregate-functions/reference/count.md#agg_function-count) or [avg](../../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg) with identical argument to [sumCount](../../sql-reference/aggregate-functions/reference/sumcount.md#agg_function-sumCount). @@ -3241,7 +3371,7 @@ Query: ``` sql CREATE TABLE fuse_tbl(a Int8, b Int8) Engine = Log; -SET optimize_fuse_sum_count_avg = 1; +SET optimize_syntax_fuse_functions = 1; EXPLAIN SYNTAX SELECT sum(a), sum(b), count(b), avg(b) from fuse_tbl FORMAT TSV; ``` @@ -3420,3 +3550,177 @@ Possible values: - 1 — The table is automatically updated in the background, when schema changes are detected. Default value: `0`. + +## materialized_postgresql_replication_slot {#materialized-postgresql-replication-slot} + +Allows to have user-managed replication slots. Must be used together with `materialized_postgresql_snapshot`. + +## materialized_postgresql_replication_slot {#materialized-postgresql-replication-slot} + +A text string identifying a snapshot, from which initial dump of tables will be performed. Must be used together with `materialized_postgresql_replication_slot`. + +## allow_experimental_projection_optimization {#allow-experimental-projection-optimization} + +Enables or disables [projection](../../engines/table-engines/mergetree-family/mergetree.md#projections) optimization when processing `SELECT` queries. + +Possible values: + +- 0 — Projection optimization disabled. +- 1 — Projection optimization enabled. + +Default value: `0`. + +## force_optimize_projection {#force-optimize-projection} + +Enables or disables the obligatory use of [projections](../../engines/table-engines/mergetree-family/mergetree.md#projections) in `SELECT` queries, when projection optimization is enabled (see [allow_experimental_projection_optimization](#allow-experimental-projection-optimization) setting). + +Possible values: + +- 0 — Projection optimization is not obligatory. +- 1 — Projection optimization is obligatory. + +Default value: `0`. + +## replication_alter_partitions_sync {#replication-alter-partitions-sync} + +Allows to set up waiting for actions to be executed on replicas by [ALTER](../../sql-reference/statements/alter/index.md), [OPTIMIZE](../../sql-reference/statements/optimize.md) or [TRUNCATE](../../sql-reference/statements/truncate.md) queries. + +Possible values: + +- 0 — Do not wait. +- 1 — Wait for own execution. +- 2 — Wait for everyone. + +Default value: `1`. + +## replication_wait_for_inactive_replica_timeout {#replication-wait-for-inactive-replica-timeout} + +Specifies how long (in seconds) to wait for inactive replicas to execute [ALTER](../../sql-reference/statements/alter/index.md), [OPTIMIZE](../../sql-reference/statements/optimize.md) or [TRUNCATE](../../sql-reference/statements/truncate.md) queries. + +Possible values: + +- 0 — Do not wait. +- Negative integer — Wait for unlimited time. +- Positive integer — The number of seconds to wait. + +Default value: `120` seconds. + +## regexp_max_matches_per_row {#regexp-max-matches-per-row} + +Sets the maximum number of matches for a single regular expression per row. Use it to protect against memory overload when using greedy regular expression in the [extractAllGroupsHorizontal](../../sql-reference/functions/string-search-functions.md#extractallgroups-horizontal) function. + +Possible values: + +- Positive integer. + +Default value: `1000`. + +## log_queries_probability {#log-queries-probability} + +Allows a user to write to [query_log](../../operations/system-tables/query_log.md), [query_thread_log](../../operations/system-tables/query_thread_log.md), and [query_views_log](../../operations/system-tables/query_views_log.md) system tables only a sample of queries selected randomly with the specified probability. It helps to reduce the load with a large volume of queries in a second. + +Possible values: + +- 0 — Queries are not logged in the system tables. +- Positive floating-point number in the range [0..1]. For example, if the setting value is `0.5`, about half of the queries are logged in the system tables. +- 1 — All queries are logged in the system tables. + +Default value: `1`. + +## short_circuit_function_evaluation {#short-circuit-function-evaluation} + +Allows calculating the [if](../../sql-reference/functions/conditional-functions.md#if), [multiIf](../../sql-reference/functions/conditional-functions.md#multiif), [and](../../sql-reference/functions/logical-functions.md#logical-and-function), and [or](../../sql-reference/functions/logical-functions.md#logical-or-function) functions according to a [short scheme](https://en.wikipedia.org/wiki/Short-circuit_evaluation). This helps optimize the execution of complex expressions in these functions and prevent possible exceptions (such as division by zero when it is not expected). + +Possible values: + +- `enable` — Enables short-circuit function evaluation for functions that are suitable for it (can throw an exception or computationally heavy). +- `force_enable` — Enables short-circuit function evaluation for all functions. +- `disable` — Disables short-circuit function evaluation. + +Default value: `enable`. + +## max_hyperscan_regexp_length {#max-hyperscan-regexp-length} + +Defines the maximum length for each regular expression in the [hyperscan multi-match functions](../../sql-reference/functions/string-search-functions.md#multimatchanyhaystack-pattern1-pattern2-patternn). + +Possible values: + +- Positive integer. +- 0 - The length is not limited. + +Default value: `0`. + +**Example** + +Query: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 3; +``` + +Result: + +```text +┌─multiMatchAny('abcd', ['ab', 'bcd', 'c', 'd'])─┐ +│ 1 │ +└────────────────────────────────────────────────┘ +``` + +Query: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 2; +``` + +Result: + +```text +Exception: Regexp length too large. +``` + +**See Also** + +- [max_hyperscan_regexp_total_length](#max-hyperscan-regexp-total-length) + +## max_hyperscan_regexp_total_length {#max-hyperscan-regexp-total-length} + +Sets the maximum length total of all regular expressions in each [hyperscan multi-match function](../../sql-reference/functions/string-search-functions.md#multimatchanyhaystack-pattern1-pattern2-patternn). + +Possible values: + +- Positive integer. +- 0 - The length is not limited. + +Default value: `0`. + +**Example** + +Query: + +```sql +SELECT multiMatchAny('abcd', ['a','b','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +Result: + +```text +┌─multiMatchAny('abcd', ['a', 'b', 'c', 'd'])─┐ +│ 1 │ +└─────────────────────────────────────────────┘ +``` + +Query: + +```sql +SELECT multiMatchAny('abcd', ['ab','bc','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +Result: + +```text +Exception: Total regexp lengths too large. +``` + +**See Also** + +- [max_hyperscan_regexp_length](#max-hyperscan-regexp-length) diff --git a/docs/en/operations/system-tables/asynchronous_metric_log.md b/docs/en/operations/system-tables/asynchronous_metric_log.md index de2e8faab10..273f1f00d71 100644 --- a/docs/en/operations/system-tables/asynchronous_metric_log.md +++ b/docs/en/operations/system-tables/asynchronous_metric_log.md @@ -36,4 +36,4 @@ SELECT * FROM system.asynchronous_metric_log LIMIT 10 - [system.asynchronous_metrics](../system-tables/asynchronous_metrics.md) — Contains metrics, calculated periodically in the background. - [system.metric_log](../system-tables/metric_log.md) — Contains history of metrics values from tables `system.metrics` and `system.events`, periodically flushed to disk. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/asynchronous_metric_log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/asynchronous_metric_log) diff --git a/docs/en/operations/system-tables/asynchronous_metrics.md b/docs/en/operations/system-tables/asynchronous_metrics.md index fc801aa1c80..11255a868cc 100644 --- a/docs/en/operations/system-tables/asynchronous_metrics.md +++ b/docs/en/operations/system-tables/asynchronous_metrics.md @@ -35,4 +35,4 @@ SELECT * FROM system.asynchronous_metrics LIMIT 10 - [system.events](../../operations/system-tables/events.md#system_tables-events) — Contains a number of events that have occurred. - [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — Contains a history of metrics values from tables `system.metrics` and `system.events`. - [Original article](https://clickhouse.tech/docs/en/operations/system-tables/asynchronous_metrics) + [Original article](https://clickhouse.com/docs/en/operations/system-tables/asynchronous_metrics) diff --git a/docs/en/operations/system-tables/clusters.md b/docs/en/operations/system-tables/clusters.md index 16cf183de53..18a4152df70 100644 --- a/docs/en/operations/system-tables/clusters.md +++ b/docs/en/operations/system-tables/clusters.md @@ -68,4 +68,4 @@ estimated_recovery_time: 0 - [distributed_replica_error_cap setting](../../operations/settings/settings.md#settings-distributed_replica_error_cap) - [distributed_replica_error_half_life setting](../../operations/settings/settings.md#settings-distributed_replica_error_half_life) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/clusters) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/clusters) diff --git a/docs/en/operations/system-tables/columns.md b/docs/en/operations/system-tables/columns.md index da4bcec48ed..de878cce793 100644 --- a/docs/en/operations/system-tables/columns.md +++ b/docs/en/operations/system-tables/columns.md @@ -86,4 +86,4 @@ The `system.columns` table contains the following columns (the column type is sh - `is_in_primary_key` (UInt8) — Flag that indicates whether the column is in the primary key expression. - `is_in_sampling_key` (UInt8) — Flag that indicates whether the column is in the sampling key expression. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/columns) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/columns) diff --git a/docs/en/operations/system-tables/contributors.md b/docs/en/operations/system-tables/contributors.md index a718c403c11..0b6e977e0e3 100644 --- a/docs/en/operations/system-tables/contributors.md +++ b/docs/en/operations/system-tables/contributors.md @@ -38,4 +38,4 @@ SELECT * FROM system.contributors WHERE name = 'Olga Khvostikova' │ Olga Khvostikova │ └──────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/contributors) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/contributors) diff --git a/docs/en/operations/system-tables/crash-log.md b/docs/en/operations/system-tables/crash-log.md index 5e9fec53429..404010afc05 100644 --- a/docs/en/operations/system-tables/crash-log.md +++ b/docs/en/operations/system-tables/crash-log.md @@ -45,4 +45,4 @@ build_id: **See also** - [trace_log](../../operations/system-tables/trace_log.md) system table -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/crash-log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/crash-log) diff --git a/docs/en/operations/system-tables/current-roles.md b/docs/en/operations/system-tables/current-roles.md index 56dbb602637..c029f367998 100644 --- a/docs/en/operations/system-tables/current-roles.md +++ b/docs/en/operations/system-tables/current-roles.md @@ -8,4 +8,4 @@ Columns: - `with_admin_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Flag that shows whether `current_role` is a role with `ADMIN OPTION` privilege. - `is_default` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Flag that shows whether `current_role` is a default role. - [Original article](https://clickhouse.tech/docs/en/operations/system-tables/current-roles) + [Original article](https://clickhouse.com/docs/en/operations/system-tables/current-roles) diff --git a/docs/en/operations/system-tables/data_type_families.md b/docs/en/operations/system-tables/data_type_families.md index fdce9c33b37..0d11b1cfefb 100644 --- a/docs/en/operations/system-tables/data_type_families.md +++ b/docs/en/operations/system-tables/data_type_families.md @@ -33,4 +33,4 @@ SELECT * FROM system.data_type_families WHERE alias_to = 'String' - [Syntax](../../sql-reference/syntax.md) — Information about supported syntax. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/data_type_families) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/data_type_families) diff --git a/docs/en/operations/system-tables/databases.md b/docs/en/operations/system-tables/databases.md index 2c78fd25c2b..c9fc8786333 100644 --- a/docs/en/operations/system-tables/databases.md +++ b/docs/en/operations/system-tables/databases.md @@ -35,4 +35,4 @@ SELECT * FROM system.databases └────────────────────────────────┴────────┴────────────────────────────┴─────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/databases) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/databases) diff --git a/docs/en/operations/system-tables/detached_parts.md b/docs/en/operations/system-tables/detached_parts.md index a5748128426..7345aa4ba6c 100644 --- a/docs/en/operations/system-tables/detached_parts.md +++ b/docs/en/operations/system-tables/detached_parts.md @@ -8,4 +8,4 @@ For the description of other columns, see [system.parts](../../operations/system If part name is invalid, values of some columns may be `NULL`. Such parts can be deleted with [ALTER TABLE DROP DETACHED PART](../../sql-reference/statements/alter/partition.md#alter_drop-detached). -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/detached_parts) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/detached_parts) diff --git a/docs/en/operations/system-tables/dictionaries.md b/docs/en/operations/system-tables/dictionaries.md index a34e893599c..bf8dcb9b5e4 100644 --- a/docs/en/operations/system-tables/dictionaries.md +++ b/docs/en/operations/system-tables/dictionaries.md @@ -61,4 +61,4 @@ SELECT * FROM system.dictionaries └──────────┴──────┴────────┴─────────────┴──────┴────────┴──────────────────────────────────────┴─────────────────────┴─────────────────┴─────────────┴──────────┴───────────────┴───────────────────────┴────────────────────────────┴──────────────┴──────────────┴─────────────────────┴──────────────────────────────┘───────────────────────┴────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/dictionaries) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/dictionaries) diff --git a/docs/en/operations/system-tables/disks.md b/docs/en/operations/system-tables/disks.md index 027e722dc55..f643e3fcfe1 100644 --- a/docs/en/operations/system-tables/disks.md +++ b/docs/en/operations/system-tables/disks.md @@ -24,4 +24,4 @@ Columns: 1 rows in set. Elapsed: 0.001 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/disks) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/disks) diff --git a/docs/en/operations/system-tables/distributed_ddl_queue.md b/docs/en/operations/system-tables/distributed_ddl_queue.md index 07f72d76324..47899ae5628 100644 --- a/docs/en/operations/system-tables/distributed_ddl_queue.md +++ b/docs/en/operations/system-tables/distributed_ddl_queue.md @@ -61,4 +61,4 @@ exception_code: ZOK 2 rows in set. Elapsed: 0.025 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/distributed_ddl_queuedistributed_ddl_queue.md) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/distributed_ddl_queuedistributed_ddl_queue.md) diff --git a/docs/en/operations/system-tables/distribution_queue.md b/docs/en/operations/system-tables/distribution_queue.md index a7037a23312..2b0ca536119 100644 --- a/docs/en/operations/system-tables/distribution_queue.md +++ b/docs/en/operations/system-tables/distribution_queue.md @@ -47,4 +47,4 @@ last_exception: - [Distributed table engine](../../engines/table-engines/special/distributed.md) -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/distribution_queue) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/distribution_queue) diff --git a/docs/en/operations/system-tables/enabled-roles.md b/docs/en/operations/system-tables/enabled-roles.md index ecfb889b6ef..54569ebbca6 100644 --- a/docs/en/operations/system-tables/enabled-roles.md +++ b/docs/en/operations/system-tables/enabled-roles.md @@ -9,4 +9,4 @@ Columns: - `is_current` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Flag that shows whether `enabled_role` is a current role of a current user. - `is_default` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Flag that shows whether `enabled_role` is a default role. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/enabled-roles) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/enabled-roles) diff --git a/docs/en/operations/system-tables/events.md b/docs/en/operations/system-tables/events.md index 2fcb5d8edec..719216a54be 100644 --- a/docs/en/operations/system-tables/events.md +++ b/docs/en/operations/system-tables/events.md @@ -31,4 +31,4 @@ SELECT * FROM system.events LIMIT 5 - [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — Contains a history of metrics values from tables `system.metrics` и `system.events`. - [Monitoring](../../operations/monitoring.md) — Base concepts of ClickHouse monitoring. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/events) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/events) diff --git a/docs/en/operations/system-tables/functions.md b/docs/en/operations/system-tables/functions.md index 38aa62c9c09..b952c103310 100644 --- a/docs/en/operations/system-tables/functions.md +++ b/docs/en/operations/system-tables/functions.md @@ -30,4 +30,4 @@ Columns: 10 rows in set. Elapsed: 0.002 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/functions) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/functions) diff --git a/docs/en/operations/system-tables/grants.md b/docs/en/operations/system-tables/grants.md index 927fa4f3227..bd0d8c3c5b8 100644 --- a/docs/en/operations/system-tables/grants.md +++ b/docs/en/operations/system-tables/grants.md @@ -21,4 +21,4 @@ Columns: - `grant_option` ([UInt8](../../sql-reference/data-types/int-uint.md#uint-ranges)) — Permission is granted `WITH GRANT OPTION`, see [GRANT](../../sql-reference/statements/grant.md#grant-privigele-syntax). -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/grants) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/grants) diff --git a/docs/en/operations/system-tables/graphite_retentions.md b/docs/en/operations/system-tables/graphite_retentions.md index 0d56242dc95..af35da1f6e5 100644 --- a/docs/en/operations/system-tables/graphite_retentions.md +++ b/docs/en/operations/system-tables/graphite_retentions.md @@ -14,4 +14,4 @@ Columns: - `Tables.database` (Array(String)) - Array of names of database tables that use the `config_name` parameter. - `Tables.table` (Array(String)) - Array of table names that use the `config_name` parameter. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/graphite_retentions) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/graphite_retentions) diff --git a/docs/en/operations/system-tables/index.md b/docs/en/operations/system-tables/index.md index ab3ba25493a..0cc5e834af1 100644 --- a/docs/en/operations/system-tables/index.md +++ b/docs/en/operations/system-tables/index.md @@ -71,4 +71,4 @@ If procfs is supported and enabled on the system, ClickHouse server collects the - `OSReadBytes` - `OSWriteBytes` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/) diff --git a/docs/en/operations/system-tables/licenses.md b/docs/en/operations/system-tables/licenses.md index d1c3e1cc5de..caef97697a6 100644 --- a/docs/en/operations/system-tables/licenses.md +++ b/docs/en/operations/system-tables/licenses.md @@ -36,4 +36,4 @@ SELECT library_name, license_type, license_path FROM system.licenses LIMIT 15 ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/licenses) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/licenses) diff --git a/docs/en/operations/system-tables/merge_tree_settings.md b/docs/en/operations/system-tables/merge_tree_settings.md index ce82cd09b8a..1f24bdbe0cf 100644 --- a/docs/en/operations/system-tables/merge_tree_settings.md +++ b/docs/en/operations/system-tables/merge_tree_settings.md @@ -51,4 +51,4 @@ type: SettingUInt64 4 rows in set. Elapsed: 0.001 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/merge_tree_settings) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/merge_tree_settings) diff --git a/docs/en/operations/system-tables/merges.md b/docs/en/operations/system-tables/merges.md index c7bdaee42e1..e9ca30d5f2c 100644 --- a/docs/en/operations/system-tables/merges.md +++ b/docs/en/operations/system-tables/merges.md @@ -22,4 +22,4 @@ Columns: - `merge_type` — The type of current merge. Empty if it's an mutation. - `merge_algorithm` — The algorithm used in current merge. Empty if it's an mutation. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/merges) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/merges) diff --git a/docs/en/operations/system-tables/metric_log.md b/docs/en/operations/system-tables/metric_log.md index ab149703309..875e443d0a6 100644 --- a/docs/en/operations/system-tables/metric_log.md +++ b/docs/en/operations/system-tables/metric_log.md @@ -48,4 +48,4 @@ CurrentMetric_DistributedFilesToInsert: 0 - [system.metrics](../../operations/system-tables/metrics.md) — Contains instantly calculated metrics. - [Monitoring](../../operations/monitoring.md) — Base concepts of ClickHouse monitoring. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/metric_log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/metric_log) diff --git a/docs/en/operations/system-tables/metrics.md b/docs/en/operations/system-tables/metrics.md index 4afab40764b..551c63d1aa3 100644 --- a/docs/en/operations/system-tables/metrics.md +++ b/docs/en/operations/system-tables/metrics.md @@ -38,4 +38,4 @@ SELECT * FROM system.metrics LIMIT 10 - [system.metric_log](../../operations/system-tables/metric_log.md#system_tables-metric_log) — Contains a history of metrics values from tables `system.metrics` и `system.events`. - [Monitoring](../../operations/monitoring.md) — Base concepts of ClickHouse monitoring. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/metrics) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/metrics) diff --git a/docs/en/operations/system-tables/mutations.md b/docs/en/operations/system-tables/mutations.md index e7d3e90b806..66ce500f213 100644 --- a/docs/en/operations/system-tables/mutations.md +++ b/docs/en/operations/system-tables/mutations.md @@ -45,4 +45,4 @@ If there were problems with mutating some data parts, the following columns cont - [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) table engine - [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md) family -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/mutations) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/mutations) diff --git a/docs/en/operations/system-tables/numbers.md b/docs/en/operations/system-tables/numbers.md index e9d64483525..774fdf86b76 100644 --- a/docs/en/operations/system-tables/numbers.md +++ b/docs/en/operations/system-tables/numbers.md @@ -29,4 +29,4 @@ Reads from this table are not parallelized. 10 rows in set. Elapsed: 0.001 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/numbers) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/numbers) diff --git a/docs/en/operations/system-tables/numbers_mt.md b/docs/en/operations/system-tables/numbers_mt.md index e11515d4c06..978a6565b71 100644 --- a/docs/en/operations/system-tables/numbers_mt.md +++ b/docs/en/operations/system-tables/numbers_mt.md @@ -27,4 +27,4 @@ Used for tests. 10 rows in set. Elapsed: 0.001 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/numbers_mt) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/numbers_mt) diff --git a/docs/en/operations/system-tables/one.md b/docs/en/operations/system-tables/one.md index 4a00e118b05..293f0412955 100644 --- a/docs/en/operations/system-tables/one.md +++ b/docs/en/operations/system-tables/one.md @@ -20,4 +20,4 @@ This is similar to the `DUAL` table found in other DBMSs. 1 rows in set. Elapsed: 0.001 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/one) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/one) diff --git a/docs/en/operations/system-tables/opentelemetry_span_log.md b/docs/en/operations/system-tables/opentelemetry_span_log.md index 9e36eae7a1b..521c155d0f7 100644 --- a/docs/en/operations/system-tables/opentelemetry_span_log.md +++ b/docs/en/operations/system-tables/opentelemetry_span_log.md @@ -50,4 +50,4 @@ attribute.values: [] - [OpenTelemetry](../../operations/opentelemetry.md) -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/opentelemetry_span_log) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/opentelemetry_span_log) diff --git a/docs/en/operations/system-tables/part_log.md b/docs/en/operations/system-tables/part_log.md index ce983282880..1fb5b12e87e 100644 --- a/docs/en/operations/system-tables/part_log.md +++ b/docs/en/operations/system-tables/part_log.md @@ -66,4 +66,4 @@ error: 0 exception: ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/part_log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/part_log) diff --git a/docs/en/operations/system-tables/parts.md b/docs/en/operations/system-tables/parts.md index cd5b3fc799a..51a0a1180f3 100644 --- a/docs/en/operations/system-tables/parts.md +++ b/docs/en/operations/system-tables/parts.md @@ -155,4 +155,4 @@ move_ttl_info.max: [] - [MergeTree family](../../engines/table-engines/mergetree-family/mergetree.md) - [TTL for Columns and Tables](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-ttl) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/parts) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/parts) diff --git a/docs/en/operations/system-tables/parts_columns.md b/docs/en/operations/system-tables/parts_columns.md index 81529544a8b..0be4324bab5 100644 --- a/docs/en/operations/system-tables/parts_columns.md +++ b/docs/en/operations/system-tables/parts_columns.md @@ -145,4 +145,4 @@ column_marks_bytes: 48 - [MergeTree family](../../engines/table-engines/mergetree-family/mergetree.md) -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/parts_columns) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/parts_columns) diff --git a/docs/en/operations/system-tables/processes.md b/docs/en/operations/system-tables/processes.md index 6090c5e4555..ee8daf0e5bf 100644 --- a/docs/en/operations/system-tables/processes.md +++ b/docs/en/operations/system-tables/processes.md @@ -58,4 +58,4 @@ Settings: {'background_pool_size':'32','load_balancing':'random','al 1 rows in set. Elapsed: 0.002 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/processes) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/processes) diff --git a/docs/en/operations/system-tables/query_log.md b/docs/en/operations/system-tables/query_log.md index 548e454cf58..0cadc975bd4 100644 --- a/docs/en/operations/system-tables/query_log.md +++ b/docs/en/operations/system-tables/query_log.md @@ -24,6 +24,8 @@ Each query creates one or two rows in the `query_log` table, depending on the st 2. If an error occurred during query processing, two events with the `QueryStart` and `ExceptionWhileProcessing` types are created. 3. If an error occurred before launching the query, a single event with the `ExceptionBeforeStart` type is created. +You can use the [log_queries_probability](../../operations/settings/settings.md#log-queries-probability) setting to reduce the number of queries, registered in the `query_log` table. + Columns: - `type` ([Enum8](../../sql-reference/data-types/enum.md)) — Type of an event that occurred when executing the query. Values: @@ -183,4 +185,4 @@ used_table_functions: [] - [system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) — This table contains information about each query execution thread. - [system.query_views_log](../../operations/system-tables/query_views_log.md#system_tables-query_views_log) — This table contains information about each view executed during a query. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/query_log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/query_log) diff --git a/docs/en/operations/system-tables/query_thread_log.md b/docs/en/operations/system-tables/query_thread_log.md index 152a10504bb..aa064d675ce 100644 --- a/docs/en/operations/system-tables/query_thread_log.md +++ b/docs/en/operations/system-tables/query_thread_log.md @@ -11,6 +11,8 @@ The flushing period of data is set in `flush_interval_milliseconds` parameter of ClickHouse does not delete data from the table automatically. See [Introduction](../../operations/system-tables/index.md#system-tables-introduction) for more details. +You can use the [log_queries_probability](../../operations/settings/settings.md#log-queries-probability) setting to reduce the number of queries, registered in the `query_thread_log` table. + Columns: - `event_date` ([Date](../../sql-reference/data-types/date.md)) — The date when the thread has finished execution of the query. @@ -114,4 +116,4 @@ ProfileEvents: {'Query':1,'SelectQuery':1,'ReadCompressedBytes':36,'Compr - [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — Description of the `query_log` system table which contains common information about queries execution. - [system.query_views_log](../../operations/system-tables/query_views_log.md#system_tables-query_views_log) — This table contains information about each view executed during a query. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/query_thread_log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/query_thread_log) diff --git a/docs/en/operations/system-tables/query_views_log.md b/docs/en/operations/system-tables/query_views_log.md index 48d36a6a118..25d7f6522f5 100644 --- a/docs/en/operations/system-tables/query_views_log.md +++ b/docs/en/operations/system-tables/query_views_log.md @@ -11,6 +11,8 @@ The flushing period of data is set in `flush_interval_milliseconds` parameter of ClickHouse does not delete data from the table automatically. See [Introduction](../../operations/system-tables/index.md#system-tables-introduction) for more details. +You can use the [log_queries_probability](../../operations/settings/settings.md#log-queries-probability) setting to reduce the number of queries, registered in the `query_views_log` table. + Columns: - `event_date` ([Date](../../sql-reference/data-types/date.md)) — The date when the last event of the view happened. @@ -43,10 +45,14 @@ Columns: **Example** +Query: + ``` sql - SELECT * FROM system.query_views_log LIMIT 1 \G +SELECT * FROM system.query_views_log LIMIT 1 \G; ``` +Result: + ``` text Row 1: ────── @@ -77,5 +83,4 @@ stack_trace: - [system.query_log](../../operations/system-tables/query_log.md#system_tables-query_log) — Description of the `query_log` system table which contains common information about queries execution. - [system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) — This table contains information about each query execution thread. - -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/query_thread_log) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/query_thread_log) diff --git a/docs/en/operations/system-tables/quota_limits.md b/docs/en/operations/system-tables/quota_limits.md index 0088b086e8c..708c4e4e33e 100644 --- a/docs/en/operations/system-tables/quota_limits.md +++ b/docs/en/operations/system-tables/quota_limits.md @@ -18,4 +18,4 @@ Columns: - `max_read_bytes` ([Nullable](../../sql-reference/data-types/nullable.md)([UInt64](../../sql-reference/data-types/int-uint.md))) — Maximum number of bytes read from all tables and table functions participated in queries. - `max_execution_time` ([Nullable](../../sql-reference/data-types/nullable.md)([Float64](../../sql-reference/data-types/float.md))) — Maximum of the query execution time, in seconds. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/quota_limits) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/quota_limits) diff --git a/docs/en/operations/system-tables/quota_usage.md b/docs/en/operations/system-tables/quota_usage.md index 2f35b6b7dae..6f4d3c9c8ee 100644 --- a/docs/en/operations/system-tables/quota_usage.md +++ b/docs/en/operations/system-tables/quota_usage.md @@ -29,4 +29,4 @@ Columns: - [SHOW QUOTA](../../sql-reference/statements/show.md#show-quota-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/quota_usage) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/quota_usage) diff --git a/docs/en/operations/system-tables/quotas.md b/docs/en/operations/system-tables/quotas.md index 6acc349a54f..d7a73de5046 100644 --- a/docs/en/operations/system-tables/quotas.md +++ b/docs/en/operations/system-tables/quotas.md @@ -24,5 +24,5 @@ Columns: - [SHOW QUOTAS](../../sql-reference/statements/show.md#show-quotas-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/quotas) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/quotas) diff --git a/docs/en/operations/system-tables/quotas_usage.md b/docs/en/operations/system-tables/quotas_usage.md index 6ba88cb935a..7d39af0f601 100644 --- a/docs/en/operations/system-tables/quotas_usage.md +++ b/docs/en/operations/system-tables/quotas_usage.md @@ -32,4 +32,4 @@ Columns: - [SHOW QUOTA](../../sql-reference/statements/show.md#show-quota-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/quotas_usage) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/quotas_usage) diff --git a/docs/en/operations/system-tables/replicas.md b/docs/en/operations/system-tables/replicas.md index e2cc607f6d8..64fc5957e69 100644 --- a/docs/en/operations/system-tables/replicas.md +++ b/docs/en/operations/system-tables/replicas.md @@ -121,5 +121,5 @@ WHERE If this query does not return anything, it means that everything is fine. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/replicas) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/replicas) diff --git a/docs/en/operations/system-tables/replicated_fetches.md b/docs/en/operations/system-tables/replicated_fetches.md index bc7e6335c0d..241bb609853 100644 --- a/docs/en/operations/system-tables/replicated_fetches.md +++ b/docs/en/operations/system-tables/replicated_fetches.md @@ -67,4 +67,4 @@ thread_id: 54 - [Managing ReplicatedMergeTree Tables](../../sql-reference/statements/system/#query-language-system-replicated) -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/replicated_fetches) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/replicated_fetches) diff --git a/docs/en/operations/system-tables/replication_queue.md b/docs/en/operations/system-tables/replication_queue.md index 965774b81bf..ac4cdddb37b 100644 --- a/docs/en/operations/system-tables/replication_queue.md +++ b/docs/en/operations/system-tables/replication_queue.md @@ -88,4 +88,4 @@ last_postpone_time: 1970-01-01 03:00:00 - [Managing ReplicatedMergeTree Tables](../../sql-reference/statements/system.md#query-language-system-replicated) -[Original article](https://clickhouse.tech/docs/en/operations/system_tables/replication_queue) +[Original article](https://clickhouse.com/docs/en/operations/system_tables/replication_queue) diff --git a/docs/en/operations/system-tables/role-grants.md b/docs/en/operations/system-tables/role-grants.md index d754c6d7fb5..6da221af1a4 100644 --- a/docs/en/operations/system-tables/role-grants.md +++ b/docs/en/operations/system-tables/role-grants.md @@ -18,4 +18,4 @@ Columns: - 1 — The role has `ADMIN OPTION` privilege. - 0 — The role without `ADMIN OPTION` privilege. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/role-grants) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/role-grants) diff --git a/docs/en/operations/system-tables/roles.md b/docs/en/operations/system-tables/roles.md index e68d5ed290a..7a71270b6c4 100644 --- a/docs/en/operations/system-tables/roles.md +++ b/docs/en/operations/system-tables/roles.md @@ -12,4 +12,4 @@ Columns: - [SHOW ROLES](../../sql-reference/statements/show.md#show-roles-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/roles) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/roles) diff --git a/docs/en/operations/system-tables/row_policies.md b/docs/en/operations/system-tables/row_policies.md index 157ec75f05e..95a26efe952 100644 --- a/docs/en/operations/system-tables/row_policies.md +++ b/docs/en/operations/system-tables/row_policies.md @@ -31,4 +31,4 @@ Columns: - [SHOW POLICIES](../../sql-reference/statements/show.md#show-policies-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/row_policies) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/row_policies) diff --git a/docs/en/operations/system-tables/settings.md b/docs/en/operations/system-tables/settings.md index cfd9f43655a..5d5eda2abc1 100644 --- a/docs/en/operations/system-tables/settings.md +++ b/docs/en/operations/system-tables/settings.md @@ -50,4 +50,4 @@ SELECT * FROM system.settings WHERE changed AND name='load_balancing' - [Constraints on Settings](../../operations/settings/constraints-on-settings.md) - [SHOW SETTINGS](../../sql-reference/statements/show.md#show-settings) statement -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/settings) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/settings) diff --git a/docs/en/operations/system-tables/settings_profile_elements.md b/docs/en/operations/system-tables/settings_profile_elements.md index 3c8c728e645..d812d8f74e0 100644 --- a/docs/en/operations/system-tables/settings_profile_elements.md +++ b/docs/en/operations/system-tables/settings_profile_elements.md @@ -27,4 +27,4 @@ Columns: - `inherit_profile` ([Nullable](../../sql-reference/data-types/nullable.md)([String](../../sql-reference/data-types/string.md))) — A parent profile for this setting profile. `NULL` if not set. Setting profile will inherit all the settings' values and constraints (`min`, `max`, `readonly`) from its parent profiles. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/settings_profile_elements) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/settings_profile_elements) diff --git a/docs/en/operations/system-tables/settings_profiles.md b/docs/en/operations/system-tables/settings_profiles.md index 7339c5c2ef6..f9b62cf5194 100644 --- a/docs/en/operations/system-tables/settings_profiles.md +++ b/docs/en/operations/system-tables/settings_profiles.md @@ -21,4 +21,4 @@ Columns: - [SHOW PROFILES](../../sql-reference/statements/show.md#show-profiles-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/settings_profiles) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/settings_profiles) diff --git a/docs/en/operations/system-tables/storage_policies.md b/docs/en/operations/system-tables/storage_policies.md index 4b07b593926..3d5be4b952b 100644 --- a/docs/en/operations/system-tables/storage_policies.md +++ b/docs/en/operations/system-tables/storage_policies.md @@ -14,4 +14,4 @@ Columns: If the storage policy contains more then one volume, then information for each volume is stored in the individual row of the table. -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/storage_policies) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/storage_policies) diff --git a/docs/en/operations/system-tables/table_engines.md b/docs/en/operations/system-tables/table_engines.md index 45ff6f1ac19..57fb5b0ff37 100644 --- a/docs/en/operations/system-tables/table_engines.md +++ b/docs/en/operations/system-tables/table_engines.md @@ -35,4 +35,4 @@ WHERE name in ('Kafka', 'MergeTree', 'ReplicatedCollapsingMergeTree') - Kafka [settings](../../engines/table-engines/integrations/kafka.md#table_engine-kafka-creating-a-table) - Join [settings](../../engines/table-engines/special/join.md#join-limitations-and-settings) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/table_engines) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/table_engines) diff --git a/docs/en/operations/system-tables/tables.md b/docs/en/operations/system-tables/tables.md index f37da02cf5b..f7da8a39856 100644 --- a/docs/en/operations/system-tables/tables.md +++ b/docs/en/operations/system-tables/tables.md @@ -117,4 +117,4 @@ lifetime_bytes: ᴺᵁᴸᴸ comment: ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/tables) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/tables) diff --git a/docs/en/operations/system-tables/text_log.md b/docs/en/operations/system-tables/text_log.md index e97af34beec..9ed0aa1ee5b 100644 --- a/docs/en/operations/system-tables/text_log.md +++ b/docs/en/operations/system-tables/text_log.md @@ -50,4 +50,4 @@ source_file: /ClickHouse/src/Interpreters/DNSCacheUpdater.cpp; void source_line: 45 ``` - [Original article](https://clickhouse.tech/docs/en/operations/system-tables/text_log) + [Original article](https://clickhouse.com/docs/en/operations/system-tables/text_log) diff --git a/docs/en/operations/system-tables/time_zones.md b/docs/en/operations/system-tables/time_zones.md index fa467124884..68f16a665cc 100644 --- a/docs/en/operations/system-tables/time_zones.md +++ b/docs/en/operations/system-tables/time_zones.md @@ -27,4 +27,4 @@ SELECT * FROM system.time_zones LIMIT 10 └────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/time_zones) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/time_zones) diff --git a/docs/en/operations/system-tables/trace_log.md b/docs/en/operations/system-tables/trace_log.md index cc70b2d8236..4902b09004d 100644 --- a/docs/en/operations/system-tables/trace_log.md +++ b/docs/en/operations/system-tables/trace_log.md @@ -54,4 +54,4 @@ trace: [371912858,371912789,371798468,371799717,371801313,3717 size: 5244400 ``` - [Original article](https://clickhouse.tech/docs/en/operations/system-tables/trace_log) + [Original article](https://clickhouse.com/docs/en/operations/system-tables/trace_log) diff --git a/docs/en/operations/system-tables/users.md b/docs/en/operations/system-tables/users.md index 0170c85a6d5..e6ab63b9df5 100644 --- a/docs/en/operations/system-tables/users.md +++ b/docs/en/operations/system-tables/users.md @@ -31,4 +31,4 @@ Columns: - [SHOW USERS](../../sql-reference/statements/show.md#show-users-statement) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/users) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/users) diff --git a/docs/en/operations/system-tables/zookeeper.md b/docs/en/operations/system-tables/zookeeper.md index 52d1c686e52..bec1d1272d6 100644 --- a/docs/en/operations/system-tables/zookeeper.md +++ b/docs/en/operations/system-tables/zookeeper.md @@ -72,4 +72,4 @@ numChildren: 7 pzxid: 987021252247 path: /clickhouse/tables/01-08/visits/replicas ``` -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/zookeeper) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/zookeeper) diff --git a/docs/en/operations/tips.md b/docs/en/operations/tips.md index 4291b91b41d..f7199372c80 100644 --- a/docs/en/operations/tips.md +++ b/docs/en/operations/tips.md @@ -33,6 +33,9 @@ $ echo 0 | sudo tee /proc/sys/vm/overcommit_memory Use `perf top` to watch the time spent in the kernel for memory management. Permanent huge pages also do not need to be allocated. +!!! warning "Attention" + If your system has less than 16 GB of RAM you may experience various memory exceptions because default settings does not match this amount of RAM. Recommended amount of RAM is 32 GB or more. You can use ClickHouse in system with small amount of RAM, even with 2 GB of RAM, but it requires an additional tuning and able to process small ingestion rate. + ## Storage Subsystem {#storage-subsystem} If your budget allows you to use SSD, use SSD. @@ -259,4 +262,4 @@ script end script ``` -{## [Original article](https://clickhouse.tech/docs/en/operations/tips/) ##} +{## [Original article](https://clickhouse.com/docs/en/operations/tips/) ##} diff --git a/docs/en/operations/utilities/clickhouse-benchmark.md b/docs/en/operations/utilities/clickhouse-benchmark.md index 5971fc0f9b3..6aa5ea556fc 100644 --- a/docs/en/operations/utilities/clickhouse-benchmark.md +++ b/docs/en/operations/utilities/clickhouse-benchmark.md @@ -160,4 +160,4 @@ localhost:9000, queries 10, QPS: 6.082, RPS: 121959604.568, MiB/s: 930.478, resu 99.990% 0.172 sec. ``` -[Original article](https://clickhouse.tech/docs/en/operations/utilities/clickhouse-benchmark.md) +[Original article](https://clickhouse.com/docs/en/operations/utilities/clickhouse-benchmark.md) diff --git a/docs/en/operations/utilities/clickhouse-copier.md b/docs/en/operations/utilities/clickhouse-copier.md index d9c209f2101..3e729a3a3dd 100644 --- a/docs/en/operations/utilities/clickhouse-copier.md +++ b/docs/en/operations/utilities/clickhouse-copier.md @@ -73,7 +73,7 @@ Parameters: false @@ -184,4 +184,4 @@ Parameters: `clickhouse-copier` tracks the changes in `/task/path/description` and applies them on the fly. For instance, if you change the value of `max_workers`, the number of processes running tasks will also change. -[Original article](https://clickhouse.tech/docs/en/operations/utils/clickhouse-copier/) +[Original article](https://clickhouse.com/docs/en/operations/utils/clickhouse-copier/) diff --git a/docs/en/operations/utilities/clickhouse-local.md b/docs/en/operations/utilities/clickhouse-local.md index b166e2f1b3c..9d28dffbc16 100644 --- a/docs/en/operations/utilities/clickhouse-local.md +++ b/docs/en/operations/utilities/clickhouse-local.md @@ -114,4 +114,4 @@ Read 186 rows, 4.15 KiB in 0.035 sec., 5302 rows/sec., 118.34 KiB/sec. ... ``` -[Original article](https://clickhouse.tech/docs/en/operations/utils/clickhouse-local/) +[Original article](https://clickhouse.com/docs/en/operations/utils/clickhouse-local/) diff --git a/docs/en/sql-reference/aggregate-functions/parametric-functions.md b/docs/en/sql-reference/aggregate-functions/parametric-functions.md index bdf115acb34..3adedd0ae70 100644 --- a/docs/en/sql-reference/aggregate-functions/parametric-functions.md +++ b/docs/en/sql-reference/aggregate-functions/parametric-functions.md @@ -154,7 +154,7 @@ SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 3) FROM └──────────────────────────────────────────────────────────────────────────────────────────┘ ``` -In this case, the function couldn’t find the event chain matching the pattern, because the event for number 3 occured between 1 and 2. If in the same case we checked the condition for number 4, the sequence would match the pattern. +In this case, the function couldn’t find the event chain matching the pattern, because the event for number 3 occurred between 1 and 2. If in the same case we checked the condition for number 4, the sequence would match the pattern. ``` sql SELECT sequenceMatch('(?1)(?2)')(time, number = 1, number = 2, number = 4) FROM t @@ -255,7 +255,7 @@ windowFunnel(window, [mode, [mode, ... ]])(timestamp, cond1, cond2, ..., condN) - `window` — Length of the sliding window, it is the time interval between the first and the last condition. The unit of `window` depends on the `timestamp` itself and varies. Determined using the expression `timestamp of cond1 <= timestamp of cond2 <= ... <= timestamp of condN <= timestamp of cond1 + window`. - `mode` — It is an optional argument. One or more modes can be set. - - `'strict'` — If same condition holds for sequence of events then such non-unique events would be skipped. + - `'strict_deduplication'` — If the same condition holds for the sequence of events, then such repeating event interrupts further processing. - `'strict_order'` — Don't allow interventions of other events. E.g. in the case of `A->B->D->C`, it stops finding `A->B->C` at the `D` and the max event level is 2. - `'strict_increase'` — Apply conditions only to events with strictly increasing timestamps. diff --git a/docs/en/sql-reference/aggregate-functions/reference/avg.md b/docs/en/sql-reference/aggregate-functions/reference/avg.md index 14a4a4c5ad5..9a22faedf7c 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/avg.md +++ b/docs/en/sql-reference/aggregate-functions/reference/avg.md @@ -63,4 +63,4 @@ Result: └────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/avg/) +[Original article](https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/avg/) diff --git a/docs/en/sql-reference/aggregate-functions/reference/index.md b/docs/en/sql-reference/aggregate-functions/reference/index.md index b96fa887279..59befed8785 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/index.md +++ b/docs/en/sql-reference/aggregate-functions/reference/index.md @@ -66,9 +66,11 @@ ClickHouse-specific aggregate functions: - [quantileDeterministic](../../../sql-reference/aggregate-functions/reference/quantiledeterministic.md) - [quantileTDigest](../../../sql-reference/aggregate-functions/reference/quantiletdigest.md) - [quantileTDigestWeighted](../../../sql-reference/aggregate-functions/reference/quantiletdigestweighted.md) +- [quantileBFloat16](../../../sql-reference/aggregate-functions/reference/quantilebfloat16.md#quantilebfloat16) +- [quantileBFloat16Weighted](../../../sql-reference/aggregate-functions/reference/quantilebfloat16.md#quantilebfloat16weighted) - [simpleLinearRegression](../../../sql-reference/aggregate-functions/reference/simplelinearregression.md) - [stochasticLinearRegression](../../../sql-reference/aggregate-functions/reference/stochasticlinearregression.md) - [stochasticLogisticRegression](../../../sql-reference/aggregate-functions/reference/stochasticlogisticregression.md) - [categoricalInformationValue](../../../sql-reference/aggregate-functions/reference/categoricalinformationvalue.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/) +[Original article](https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/) diff --git a/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest.md b/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest.md index 8c57a3eb896..fe97f7edbf8 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest.md +++ b/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest.md @@ -71,4 +71,4 @@ Result: - [Mann–Whitney U test](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) - [Stochastic ordering](https://en.wikipedia.org/wiki/Stochastic_ordering) -[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest/) +[Original article](https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/mannwhitneyutest/) diff --git a/docs/en/sql-reference/aggregate-functions/reference/quantilebfloat16.md b/docs/en/sql-reference/aggregate-functions/reference/quantilebfloat16.md index 25c7233aa56..728c200441d 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/quantilebfloat16.md +++ b/docs/en/sql-reference/aggregate-functions/reference/quantilebfloat16.md @@ -58,6 +58,10 @@ Result: ``` Note that all floating point values in the example are truncated to 1.0 when converting to `bfloat16`. +# quantileBFloat16Weighted {#quantilebfloat16weighted} + +Like `quantileBFloat16` but takes into account the weight of each sequence member. + **See Also** - [median](../../../sql-reference/aggregate-functions/reference/median.md#median) diff --git a/docs/en/sql-reference/aggregate-functions/reference/studentttest.md b/docs/en/sql-reference/aggregate-functions/reference/studentttest.md index 36f80ae6cd7..fd391298bc3 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/studentttest.md +++ b/docs/en/sql-reference/aggregate-functions/reference/studentttest.md @@ -63,4 +63,4 @@ Result: - [Student's t-test](https://en.wikipedia.org/wiki/Student%27s_t-test) - [welchTTest function](welchttest.md#welchttest) -[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/studentttest/) +[Original article](https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/studentttest/) diff --git a/docs/en/sql-reference/aggregate-functions/reference/sumcount.md b/docs/en/sql-reference/aggregate-functions/reference/sumcount.md index 2986511e01a..00a7a9fc9f1 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/sumcount.md +++ b/docs/en/sql-reference/aggregate-functions/reference/sumcount.md @@ -43,4 +43,4 @@ Result: **See also** -- [optimize_fuse_sum_count_avg](../../../operations/settings/settings.md#optimize_fuse_sum_count_avg) setting. +- [optimize_syntax_fuse_functions](../../../operations/settings/settings.md#optimize_syntax_fuse_functions) setting. diff --git a/docs/en/sql-reference/aggregate-functions/reference/welchttest.md b/docs/en/sql-reference/aggregate-functions/reference/welchttest.md index 2c1a043aed6..62f5761b32e 100644 --- a/docs/en/sql-reference/aggregate-functions/reference/welchttest.md +++ b/docs/en/sql-reference/aggregate-functions/reference/welchttest.md @@ -63,4 +63,4 @@ Result: - [Welch's t-test](https://en.wikipedia.org/wiki/Welch%27s_t-test) - [studentTTest function](studentttest.md#studentttest) -[Original article](https://clickhouse.tech/docs/en/sql-reference/aggregate-functions/reference/welchTTest/) +[Original article](https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/welchTTest/) diff --git a/docs/en/sql-reference/data-types/aggregatefunction.md b/docs/en/sql-reference/data-types/aggregatefunction.md index 5bc8ffc666b..81945eeece6 100644 --- a/docs/en/sql-reference/data-types/aggregatefunction.md +++ b/docs/en/sql-reference/data-types/aggregatefunction.md @@ -65,4 +65,4 @@ SELECT uniqMerge(state) FROM (SELECT uniqState(UserID) AS state FROM table GROUP See [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) engine description. -[Original article](https://clickhouse.tech/docs/en/data_types/nested_data_structures/aggregatefunction/) +[Original article](https://clickhouse.com/docs/en/data_types/nested_data_structures/aggregatefunction/) diff --git a/docs/en/sql-reference/data-types/boolean.md b/docs/en/sql-reference/data-types/boolean.md index 5890725da8f..ca44238277c 100644 --- a/docs/en/sql-reference/data-types/boolean.md +++ b/docs/en/sql-reference/data-types/boolean.md @@ -7,4 +7,4 @@ toc_title: Boolean There is no separate type for boolean values. Use UInt8 type, restricted to the values 0 or 1. -[Original article](https://clickhouse.tech/docs/en/data_types/boolean/) +[Original article](https://clickhouse.com/docs/en/data_types/boolean/) diff --git a/docs/en/sql-reference/data-types/date.md b/docs/en/sql-reference/data-types/date.md index 0cfac4d59fe..bd39de14d47 100644 --- a/docs/en/sql-reference/data-types/date.md +++ b/docs/en/sql-reference/data-types/date.md @@ -9,9 +9,9 @@ A date. Stored in two bytes as the number of days since 1970-01-01 (unsigned). A The date value is stored without the time zone. -## Examples {#examples} +**Example** -**1.** Creating a table with a `DateTime`-type column and inserting data into it: +Creating a table with a `Date`-type column and inserting data into it: ``` sql CREATE TABLE dt @@ -23,10 +23,7 @@ ENGINE = TinyLog; ``` ``` sql -INSERT INTO dt Values (1546300800, 1), ('2019-01-01', 2); -``` - -``` sql +INSERT INTO dt VALUES (1546300800, 1), ('2019-01-01', 2); SELECT * FROM dt; ``` @@ -37,11 +34,8 @@ SELECT * FROM dt; └────────────┴──────────┘ ``` -## See Also {#see-also} +**See Also** - [Functions for working with dates and times](../../sql-reference/functions/date-time-functions.md) - [Operators for working with dates and times](../../sql-reference/operators/index.md#operators-datetime) - [`DateTime` data type](../../sql-reference/data-types/datetime.md) - - -[Original article](https://clickhouse.tech/docs/en/data_types/date/) diff --git a/docs/en/sql-reference/data-types/date32.md b/docs/en/sql-reference/data-types/date32.md new file mode 100644 index 00000000000..592f952e1be --- /dev/null +++ b/docs/en/sql-reference/data-types/date32.md @@ -0,0 +1,40 @@ +--- +toc_priority: 48 +toc_title: Date32 +--- + +# Date32 {#data_type-datetime32} + +A date. Supports the date range same with [Datetime64](../../sql-reference/data-types/datetime64.md). Stored in four bytes as the number of days since 1925-01-01. Allows storing values till 2283-11-11. + +**Examples** + +Creating a table with a `Date32`-type column and inserting data into it: + +``` sql +CREATE TABLE new +( + `timestamp` Date32, + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +INSERT INTO new VALUES (4102444800, 1), ('2100-01-01', 2); +SELECT * FROM new; +``` + +``` text +┌──timestamp─┬─event_id─┐ +│ 2100-01-01 │ 1 │ +│ 2100-01-01 │ 2 │ +└────────────┴──────────┘ +``` + +**See Also** + +- [toDate32](../../sql-reference/functions/type-conversion-functions.md#todate32) +- [toDate32OrZero](../../sql-reference/functions/type-conversion-functions.md#todate32-or-zero) +- [toDate32OrNull](../../sql-reference/functions/type-conversion-functions.md#todate32-or-null) + diff --git a/docs/en/sql-reference/data-types/datetime.md b/docs/en/sql-reference/data-types/datetime.md index ed07f599b91..1f9a79b5444 100644 --- a/docs/en/sql-reference/data-types/datetime.md +++ b/docs/en/sql-reference/data-types/datetime.md @@ -145,4 +145,4 @@ Time shifts for multiple days. Some pacific islands changed their timezone offse - [Operators for working with dates and times](../../sql-reference/operators/index.md#operators-datetime) - [The `Date` data type](../../sql-reference/data-types/date.md) -[Original article](https://clickhouse.tech/docs/en/data_types/datetime/) +[Original article](https://clickhouse.com/docs/en/data_types/datetime/) diff --git a/docs/en/sql-reference/data-types/datetime64.md b/docs/en/sql-reference/data-types/datetime64.md index 1d3725b9fb3..bac1a080a80 100644 --- a/docs/en/sql-reference/data-types/datetime64.md +++ b/docs/en/sql-reference/data-types/datetime64.md @@ -7,7 +7,8 @@ toc_title: DateTime64 Allows to store an instant in time, that can be expressed as a calendar date and a time of a day, with defined sub-second precision -Tick size (precision): 10-precision seconds +Tick size (precision): 10-precision seconds. Valid range: [ 0 : 9 ]. +Typically are used - 3 (milliseconds), 6 (microseconds), 9 (nanoseconds). **Syntax:** @@ -17,7 +18,7 @@ DateTime64(precision, [timezone]) Internally, stores data as a number of ‘ticks’ since epoch start (1970-01-01 00:00:00 UTC) as Int64. The tick resolution is determined by the precision parameter. Additionally, the `DateTime64` type can store time zone that is the same for the entire column, that affects how the values of the `DateTime64` type values are displayed in text format and how the values specified as strings are parsed (‘2020-01-01 05:00:01.000’). The time zone is not stored in the rows of the table (or in resultset), but is stored in the column metadata. See details in [DateTime](../../sql-reference/data-types/datetime.md). -Supported range from January 1, 1925 till December 31, 2283. +Supported range from January 1, 1925 till November 11, 2283. ## Examples {#examples} diff --git a/docs/en/sql-reference/data-types/decimal.md b/docs/en/sql-reference/data-types/decimal.md index af2655cd0c2..fae0bb6dbb9 100644 --- a/docs/en/sql-reference/data-types/decimal.md +++ b/docs/en/sql-reference/data-types/decimal.md @@ -111,4 +111,4 @@ DB::Exception: Can't compare. - [isDecimalOverflow](../../sql-reference/functions/other-functions.md#is-decimal-overflow) - [countDigits](../../sql-reference/functions/other-functions.md#count-digits) -[Original article](https://clickhouse.tech/docs/en/data_types/decimal/) +[Original article](https://clickhouse.com/docs/en/data_types/decimal/) diff --git a/docs/en/sql-reference/data-types/domains/index.md b/docs/en/sql-reference/data-types/domains/index.md index 143aafe4db3..57db0c4263c 100644 --- a/docs/en/sql-reference/data-types/domains/index.md +++ b/docs/en/sql-reference/data-types/domains/index.md @@ -28,4 +28,4 @@ You can use domains anywhere corresponding base type can be used, for example: - Can’t implicitly convert string values into domain values when inserting data from another column or table. - Domain adds no constrains on stored values. -[Original article](https://clickhouse.tech/docs/en/data_types/domains/) +[Original article](https://clickhouse.com/docs/en/data_types/domains/) diff --git a/docs/en/sql-reference/data-types/domains/ipv4.md b/docs/en/sql-reference/data-types/domains/ipv4.md index 1237514b9e7..aafd46edef8 100644 --- a/docs/en/sql-reference/data-types/domains/ipv4.md +++ b/docs/en/sql-reference/data-types/domains/ipv4.md @@ -31,16 +31,16 @@ CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY from; `IPv4` domain supports custom input format as IPv4-strings: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.tech', '183.247.232.58')('https://clickhouse.tech/docs/en/', '116.106.34.242'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.com', '183.247.232.58')('https://clickhouse.com/docs/en/', '116.106.34.242'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬───────────from─┐ -│ https://clickhouse.tech/docs/en/ │ 116.106.34.242 │ +│ https://clickhouse.com/docs/en/ │ 116.106.34.242 │ │ https://wikipedia.org │ 116.253.40.133 │ -│ https://clickhouse.tech │ 183.247.232.58 │ +│ https://clickhouse.com │ 183.247.232.58 │ └────────────────────────────────────┴────────────────┘ ``` @@ -79,4 +79,4 @@ SELECT toTypeName(i), CAST(from as UInt32) as i FROM hits LIMIT 1; └──────────────────────────────────┴────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data_types/domains/ipv4) +[Original article](https://clickhouse.com/docs/en/data_types/domains/ipv4) diff --git a/docs/en/sql-reference/data-types/domains/ipv6.md b/docs/en/sql-reference/data-types/domains/ipv6.md index bc57202bf66..30b3c8add69 100644 --- a/docs/en/sql-reference/data-types/domains/ipv6.md +++ b/docs/en/sql-reference/data-types/domains/ipv6.md @@ -31,15 +31,15 @@ CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY from; `IPv6` domain supports custom input as IPv6-strings: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.tech', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.tech/docs/en/', '2a02:e980:1e::1'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.com', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.com/docs/en/', '2a02:e980:1e::1'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬─from──────────────────────────┐ -│ https://clickhouse.tech │ 2001:44c8:129:2632:33:0:252:2 │ -│ https://clickhouse.tech/docs/en/ │ 2a02:e980:1e::1 │ +│ https://clickhouse.com │ 2001:44c8:129:2632:33:0:252:2 │ +│ https://clickhouse.com/docs/en/ │ 2a02:e980:1e::1 │ │ https://wikipedia.org │ 2a02:aa08:e000:3100::2 │ └────────────────────────────────────┴───────────────────────────────┘ ``` @@ -81,4 +81,4 @@ SELECT toTypeName(i), CAST(from as FixedString(16)) as i FROM hits LIMIT 1; └───────────────────────────────────────────┴─────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data_types/domains/ipv6) +[Original article](https://clickhouse.com/docs/en/data_types/domains/ipv6) diff --git a/docs/en/sql-reference/data-types/enum.md b/docs/en/sql-reference/data-types/enum.md index 8c1e42aec79..ae22e60a5f3 100644 --- a/docs/en/sql-reference/data-types/enum.md +++ b/docs/en/sql-reference/data-types/enum.md @@ -127,4 +127,4 @@ The Enum type can be changed without cost using ALTER, if only the set of values Using ALTER, it is possible to change an Enum8 to an Enum16 or vice versa, just like changing an Int8 to Int16. -[Original article](https://clickhouse.tech/docs/en/data_types/enum/) +[Original article](https://clickhouse.com/docs/en/data_types/enum/) diff --git a/docs/en/sql-reference/data-types/fixedstring.md b/docs/en/sql-reference/data-types/fixedstring.md index 6f5725b017c..59ed123fb10 100644 --- a/docs/en/sql-reference/data-types/fixedstring.md +++ b/docs/en/sql-reference/data-types/fixedstring.md @@ -58,4 +58,4 @@ This behaviour differs from MySQL for the `CHAR` type (where strings are padded Note that the length of the `FixedString(N)` value is constant. The [length](../../sql-reference/functions/array-functions.md#array_functions-length) function returns `N` even if the `FixedString(N)` value is filled only with null bytes, but the [empty](../../sql-reference/functions/string-functions.md#empty) function returns `1` in this case. -[Original article](https://clickhouse.tech/docs/en/data_types/fixedstring/) +[Original article](https://clickhouse.com/docs/en/data_types/fixedstring/) diff --git a/docs/en/sql-reference/data-types/float.md b/docs/en/sql-reference/data-types/float.md index 1e3486cdae7..fcc071b9f9a 100644 --- a/docs/en/sql-reference/data-types/float.md +++ b/docs/en/sql-reference/data-types/float.md @@ -89,4 +89,4 @@ SELECT 0 / 0 See the rules for `NaN` sorting in the section [ORDER BY clause](../../sql-reference/statements/select/order-by.md). -[Original article](https://clickhouse.tech/docs/en/data_types/float/) +[Original article](https://clickhouse.com/docs/en/data_types/float/) diff --git a/docs/en/sql-reference/data-types/geo.md b/docs/en/sql-reference/data-types/geo.md index d44f86a4262..e6d32ef3305 100644 --- a/docs/en/sql-reference/data-types/geo.md +++ b/docs/en/sql-reference/data-types/geo.md @@ -103,4 +103,4 @@ Result: └─────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data-types/geo/) +[Original article](https://clickhouse.com/docs/en/data-types/geo/) diff --git a/docs/en/sql-reference/data-types/index.md b/docs/en/sql-reference/data-types/index.md index 92a4d034278..831b8d19d94 100644 --- a/docs/en/sql-reference/data-types/index.md +++ b/docs/en/sql-reference/data-types/index.md @@ -12,4 +12,4 @@ This section describes the supported data types and special considerations for u You can check whether data type name is case-sensitive in the [system.data_type_families](../../operations/system-tables/data_type_families.md#system_tables-data_type_families) table. -[Original article](https://clickhouse.tech/docs/en/data_types/) +[Original article](https://clickhouse.com/docs/en/data_types/) diff --git a/docs/en/sql-reference/data-types/int-uint.md b/docs/en/sql-reference/data-types/int-uint.md index 95d1120ed3d..588b5a2d7d6 100644 --- a/docs/en/sql-reference/data-types/int-uint.md +++ b/docs/en/sql-reference/data-types/int-uint.md @@ -25,14 +25,13 @@ Aliases: - `Int32` — `INT`, `INT4`, `INTEGER`. - `Int64` — `BIGINT`. -## Uint Ranges {#uint-ranges} +## UInt Ranges {#uint-ranges} - `UInt8` — \[0 : 255\] - `UInt16` — \[0 : 65535\] - `UInt32` — \[0 : 4294967295\] - `UInt64` — \[0 : 18446744073709551615\] +- `UInt128` — \[0 : 340282366920938463463374607431768211455\] - `UInt256` — \[0 : 115792089237316195423570985008687907853269984665640564039457584007913129639935\] -`UInt128` is not supported yet. - -[Original article](https://clickhouse.tech/docs/en/data_types/int_uint/) +[Original article](https://clickhouse.com/docs/en/data_types/int_uint/) diff --git a/docs/en/sql-reference/data-types/lowcardinality.md b/docs/en/sql-reference/data-types/lowcardinality.md index b3ff26a943d..3a813103335 100644 --- a/docs/en/sql-reference/data-types/lowcardinality.md +++ b/docs/en/sql-reference/data-types/lowcardinality.md @@ -55,6 +55,5 @@ Functions: ## See Also {#see-also} -- [A Magical Mystery Tour of the LowCardinality Data Type](https://www.altinity.com/blog/2019/3/27/low-cardinality). - [Reducing ClickHouse Storage Cost with the Low Cardinality Type – Lessons from an Instana Engineer](https://www.instana.com/blog/reducing-clickhouse-storage-cost-with-the-low-cardinality-type-lessons-from-an-instana-engineer/). -- [String Optimization (video presentation in Russian)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [Slides in English](https://github.com/yandex/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). +- [String Optimization (video presentation in Russian)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [Slides in English](https://github.com/ClickHouse/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). diff --git a/docs/en/sql-reference/data-types/map.md b/docs/en/sql-reference/data-types/map.md index bfad4375f28..cdc3c874043 100644 --- a/docs/en/sql-reference/data-types/map.md +++ b/docs/en/sql-reference/data-types/map.md @@ -108,4 +108,4 @@ Result: - [map()](../../sql-reference/functions/tuple-map-functions.md#function-map) function - [CAST()](../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast) function -[Original article](https://clickhouse.tech/docs/en/data-types/map/) +[Original article](https://clickhouse.com/docs/en/data-types/map/) diff --git a/docs/en/sql-reference/data-types/multiword-types.md b/docs/en/sql-reference/data-types/multiword-types.md index 5012fbb404e..bd91dd10ad6 100644 --- a/docs/en/sql-reference/data-types/multiword-types.md +++ b/docs/en/sql-reference/data-types/multiword-types.md @@ -26,4 +26,4 @@ When creating tables, you can use data types with a name consisting of several w | BINARY LARGE OBJECT | [String](../../sql-reference/data-types/string.md) | | BINARY VARYING | [String](../../sql-reference/data-types/string.md) | -[Original article](https://clickhouse.tech/docs/en/sql-reference/data-types/multiword-types/) +[Original article](https://clickhouse.com/docs/en/sql-reference/data-types/multiword-types/) diff --git a/docs/en/sql-reference/data-types/nested-data-structures/index.md b/docs/en/sql-reference/data-types/nested-data-structures/index.md index 14562254e57..b383fc53464 100644 --- a/docs/en/sql-reference/data-types/nested-data-structures/index.md +++ b/docs/en/sql-reference/data-types/nested-data-structures/index.md @@ -7,4 +7,4 @@ toc_title: hidden # Nested Data Structures {#nested-data-structures} -[Original article](https://clickhouse.tech/docs/en/data_types/nested_data_structures/) +[Original article](https://clickhouse.com/docs/en/data_types/nested_data_structures/) diff --git a/docs/en/sql-reference/data-types/nested-data-structures/nested.md b/docs/en/sql-reference/data-types/nested-data-structures/nested.md index ec6c613a956..e08b7e0de3e 100644 --- a/docs/en/sql-reference/data-types/nested-data-structures/nested.md +++ b/docs/en/sql-reference/data-types/nested-data-structures/nested.md @@ -3,7 +3,9 @@ toc_priority: 57 toc_title: Nested(Name1 Type1, Name2 Type2, ...) --- -# Nested(name1 Type1, Name2 Type2, …) {#nestedname1-type1-name2-type2} +# Nested {#nested} + +## Nested(name1 Type1, Name2 Type2, …) {#nestedname1-type1-name2-type2} A nested data structure is like a table inside a cell. The parameters of a nested data structure – the column names and types – are specified the same way as in a [CREATE TABLE](../../../sql-reference/statements/create/table.md) query. Each table row can correspond to any number of rows in a nested data structure. @@ -101,4 +103,4 @@ For a DESCRIBE query, the columns in a nested data structure are listed separate The ALTER query for elements in a nested data structure has limitations. -[Original article](https://clickhouse.tech/docs/en/data_types/nested_data_structures/nested/) +[Original article](https://clickhouse.com/docs/en/data_types/nested_data_structures/nested/) diff --git a/docs/en/sql-reference/data-types/nullable.md b/docs/en/sql-reference/data-types/nullable.md index de53a47afb7..2154315d269 100644 --- a/docs/en/sql-reference/data-types/nullable.md +++ b/docs/en/sql-reference/data-types/nullable.md @@ -68,4 +68,4 @@ SELECT x + y FROM t_null └────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data_types/nullable/) +[Original article](https://clickhouse.com/docs/en/data_types/nullable/) diff --git a/docs/en/sql-reference/data-types/simpleaggregatefunction.md b/docs/en/sql-reference/data-types/simpleaggregatefunction.md index e0d8001dcbb..7a4c4375541 100644 --- a/docs/en/sql-reference/data-types/simpleaggregatefunction.md +++ b/docs/en/sql-reference/data-types/simpleaggregatefunction.md @@ -38,4 +38,4 @@ The following aggregate functions are supported: CREATE TABLE simple (id UInt64, val SimpleAggregateFunction(sum, Double)) ENGINE=AggregatingMergeTree ORDER BY id; ``` -[Original article](https://clickhouse.tech/docs/en/data_types/simpleaggregatefunction/) +[Original article](https://clickhouse.com/docs/en/data_types/simpleaggregatefunction/) diff --git a/docs/en/sql-reference/data-types/special-data-types/expression.md b/docs/en/sql-reference/data-types/special-data-types/expression.md index c707a01cf26..e1ffba478e6 100644 --- a/docs/en/sql-reference/data-types/special-data-types/expression.md +++ b/docs/en/sql-reference/data-types/special-data-types/expression.md @@ -7,4 +7,4 @@ toc_title: Expression Expressions are used for representing lambdas in high-order functions. -[Original article](https://clickhouse.tech/docs/en/data_types/special_data_types/expression/) +[Original article](https://clickhouse.com/docs/en/data_types/special_data_types/expression/) diff --git a/docs/en/sql-reference/data-types/special-data-types/index.md b/docs/en/sql-reference/data-types/special-data-types/index.md index 83919eee56b..3398af94c70 100644 --- a/docs/en/sql-reference/data-types/special-data-types/index.md +++ b/docs/en/sql-reference/data-types/special-data-types/index.md @@ -9,4 +9,4 @@ toc_title: hidden Special data type values can’t be serialized for saving in a table or output in query results, but can be used as an intermediate result during query execution. -[Original article](https://clickhouse.tech/docs/en/data_types/special_data_types/) +[Original article](https://clickhouse.com/docs/en/data_types/special_data_types/) diff --git a/docs/en/sql-reference/data-types/special-data-types/nothing.md b/docs/en/sql-reference/data-types/special-data-types/nothing.md index 0edd5a0cd6d..e69272a665e 100644 --- a/docs/en/sql-reference/data-types/special-data-types/nothing.md +++ b/docs/en/sql-reference/data-types/special-data-types/nothing.md @@ -21,4 +21,4 @@ SELECT toTypeName(array()) └─────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data_types/special_data_types/nothing/) +[Original article](https://clickhouse.com/docs/en/data_types/special_data_types/nothing/) diff --git a/docs/en/sql-reference/data-types/special-data-types/set.md b/docs/en/sql-reference/data-types/special-data-types/set.md index fdc03ad3de1..6babd047888 100644 --- a/docs/en/sql-reference/data-types/special-data-types/set.md +++ b/docs/en/sql-reference/data-types/special-data-types/set.md @@ -7,4 +7,4 @@ toc_title: Set Used for the right half of an [IN](../../../sql-reference/operators/in.md#select-in-operators) expression. -[Original article](https://clickhouse.tech/docs/en/data_types/special_data_types/set/) +[Original article](https://clickhouse.com/docs/en/data_types/special_data_types/set/) diff --git a/docs/en/sql-reference/data-types/string.md b/docs/en/sql-reference/data-types/string.md index 2cf11ac85a3..5b0059b330e 100644 --- a/docs/en/sql-reference/data-types/string.md +++ b/docs/en/sql-reference/data-types/string.md @@ -17,4 +17,4 @@ If you need to store texts, we recommend using UTF-8 encoding. At the very least Similarly, certain functions for working with strings have separate variations that work under the assumption that the string contains a set of bytes representing a UTF-8 encoded text. For example, the [length](../functions/string-functions.md#length) function calculates the string length in bytes, while the [lengthUTF8](../functions/string-functions.md#lengthutf8) function calculates the string length in Unicode code points, assuming that the value is UTF-8 encoded. -[Original article](https://clickhouse.tech/docs/en/data_types/string/) +[Original article](https://clickhouse.com/docs/en/data_types/string/) diff --git a/docs/en/sql-reference/data-types/tuple.md b/docs/en/sql-reference/data-types/tuple.md index dea5e10365f..b28bef67af5 100644 --- a/docs/en/sql-reference/data-types/tuple.md +++ b/docs/en/sql-reference/data-types/tuple.md @@ -75,4 +75,4 @@ Result: └────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/data_types/tuple/) +[Original article](https://clickhouse.com/docs/en/data_types/tuple/) diff --git a/docs/en/sql-reference/data-types/uuid.md b/docs/en/sql-reference/data-types/uuid.md index 1e22b41b508..528534de0a0 100644 --- a/docs/en/sql-reference/data-types/uuid.md +++ b/docs/en/sql-reference/data-types/uuid.md @@ -72,4 +72,4 @@ The UUID data type only supports functions which [String](../../sql-reference/da The UUID data type is not supported by arithmetic operations (for example, [abs](../../sql-reference/functions/arithmetic-functions.md#arithm_func-abs)) or aggregate functions, such as [sum](../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum) and [avg](../../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg). -[Original article](https://clickhouse.tech/docs/en/data_types/uuid/) +[Original article](https://clickhouse.com/docs/en/data_types/uuid/) diff --git a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index ffa0fd6f29e..f525ea64aa2 100644 --- a/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -58,6 +58,7 @@ LAYOUT(LAYOUT_TYPE(param value)) -- layout settings - [direct](#direct) - [range_hashed](#range-hashed) - [complex_key_hashed](#complex-key-hashed) +- [complex_key_range_hashed](#complex-key-range-hashed) - [complex_key_cache](#complex-key-cache) - [ssd_cache](#ssd-cache) - [ssd_complex_key_cache](#complex-key-ssd-cache) @@ -174,7 +175,10 @@ Example: The table contains discounts for each advertiser in the format: +---------|-------------|-------------|------+ ``` -To use a sample for date ranges, define the `range_min` and `range_max` elements in the [structure](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). These elements must contain elements `name` and`type` (if `type` is not specified, the default type will be used - Date). `type` can be any numeric type (Date / DateTime / UInt64 / Int32 / others). +To use a sample for date ranges, define the `range_min` and `range_max` elements in the [structure](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). These elements must contain elements `name` and `type` (if `type` is not specified, the default type will be used - Date). `type` can be any numeric type (Date / DateTime / UInt64 / Int32 / others). + +!!! warning "Warning" + Values of `range_min` and `range_max` should fit in `Int64` type. Example: @@ -225,34 +229,33 @@ Configuration example: ``` xml - + + ... - ... + + + - - - + + + Abcdef + + + StartTimeStamp + UInt64 + + + EndTimeStamp + UInt64 + + + XXXType + String + + + - - - Abcdef - - - StartTimeStamp - UInt64 - - - EndTimeStamp - UInt64 - - - XXXType - String - - - - - + ``` @@ -269,6 +272,28 @@ PRIMARY KEY Abcdef RANGE(MIN StartTimeStamp MAX EndTimeStamp) ``` +### complex_key_range_hashed {#complex-key-range-hashed} + +The dictionary is stored in memory in the form of a hash table with an ordered array of ranges and their corresponding values (see [range_hashed](#range-hashed)). This type of storage is for use with composite [keys](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). + +Configuration example: + +``` sql +CREATE DICTIONARY range_dictionary +( + CountryID UInt64, + CountryKey String, + StartDate Date, + EndDate Date, + Tax Float64 DEFAULT 0.2 +) +PRIMARY KEY CountryID, CountryKey +SOURCE(CLICKHOUSE(TABLE 'date_table')) +LIFETIME(MIN 1 MAX 1000) +LAYOUT(COMPLEX_KEY_RANGE_HASHED()) +RANGE(MIN StartDate MAX EndDate); +``` + ### cache {#cache} The dictionary is stored in a cache that has a fixed number of cells. These cells contain frequently used elements. diff --git a/docs/en/sql-reference/functions/array-functions.md b/docs/en/sql-reference/functions/array-functions.md index 1148edc6a58..d85092d683a 100644 --- a/docs/en/sql-reference/functions/array-functions.md +++ b/docs/en/sql-reference/functions/array-functions.md @@ -860,13 +860,13 @@ arrayDifference(array) **Arguments** -- `array` – [Array](https://clickhouse.tech/docs/en/data_types/array/). +- `array` – [Array](https://clickhouse.com/docs/en/data_types/array/). **Returned values** Returns an array of differences between adjacent elements. -Type: [UInt\*](https://clickhouse.tech/docs/en/data_types/int_uint/#uint-ranges), [Int\*](https://clickhouse.tech/docs/en/data_types/int_uint/#int-ranges), [Float\*](https://clickhouse.tech/docs/en/data_types/float/). +Type: [UInt\*](https://clickhouse.com/docs/en/data_types/int_uint/#uint-ranges), [Int\*](https://clickhouse.com/docs/en/data_types/int_uint/#int-ranges), [Float\*](https://clickhouse.com/docs/en/data_types/float/). **Example** @@ -912,7 +912,7 @@ arrayDistinct(array) **Arguments** -- `array` – [Array](https://clickhouse.tech/docs/en/data_types/array/). +- `array` – [Array](https://clickhouse.com/docs/en/data_types/array/). **Returned values** diff --git a/docs/en/sql-reference/functions/bitmap-functions.md b/docs/en/sql-reference/functions/bitmap-functions.md index f8d1fdc69fa..a6104835469 100644 --- a/docs/en/sql-reference/functions/bitmap-functions.md +++ b/docs/en/sql-reference/functions/bitmap-functions.md @@ -107,7 +107,7 @@ bitmapSubsetLimit(bitmap, range_start, cardinality_limit) The subset. -Type: `Bitmap object`. +Type: [Bitmap object](#bitmap_functions-bitmapbuild). **Example** @@ -125,9 +125,9 @@ Result: └───────────────────────────┘ ``` -## subBitmap {#subBitmap} +## subBitmap {#subbitmap} -Creates a subset of bitmap limit the results to `cardinality_limit` with offset of `offset`. +Returns the bitmap elements, starting from the `offset` position. The number of returned elements is limited by the `cardinality_limit` parameter. Analog of the [substring](string-functions.md#substring)) string function, but for bitmap. **Syntax** @@ -137,15 +137,15 @@ subBitmap(bitmap, offset, cardinality_limit) **Arguments** -- `bitmap` – [Bitmap object](#bitmap_functions-bitmapbuild). -- `offset` – the number of offsets. Type: [UInt32](../../sql-reference/data-types/int-uint.md). -- `cardinality_limit` – The subset cardinality upper limit. Type: [UInt32](../../sql-reference/data-types/int-uint.md). +- `bitmap` – The bitmap. Type: [Bitmap object](#bitmap_functions-bitmapbuild). +- `offset` – The position of the first element of the subset. Type: [UInt32](../../sql-reference/data-types/int-uint.md). +- `cardinality_limit` – The maximum number of elements in the subset. Type: [UInt32](../../sql-reference/data-types/int-uint.md). **Returned value** The subset. -Type: `Bitmap object`. +Type: [Bitmap object](#bitmap_functions-bitmapbuild). **Example** diff --git a/docs/en/sql-reference/functions/conditional-functions.md b/docs/en/sql-reference/functions/conditional-functions.md index a23da82a9c6..241112f7f7f 100644 --- a/docs/en/sql-reference/functions/conditional-functions.md +++ b/docs/en/sql-reference/functions/conditional-functions.md @@ -12,11 +12,13 @@ Controls conditional branching. Unlike most systems, ClickHouse always evaluate **Syntax** ``` sql -SELECT if(cond, then, else) +if(cond, then, else) ``` If the condition `cond` evaluates to a non-zero value, returns the result of the expression `then`, and the result of the expression `else`, if present, is skipped. If the `cond` is zero or `NULL`, then the result of the `then` expression is skipped and the result of the `else` expression, if present, is returned. +You can use the [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) setting to calculate the `if` function according to a short scheme. If this setting is enabled, `then` expression is evaluated only on rows where `cond` is true, `else` expression – where `cond` is false. For example, an exception about division by zero is not thrown when executing the query `SELECT if(number = 0, 0, intDiv(42, number)) FROM numbers(10)`, because `intDiv(42, number)` will be evaluated only for numbers that doesn't satisfy condition `number = 0`. + **Arguments** - `cond` – The condition for evaluation that can be zero or not. The type is UInt8, Nullable(UInt8) or NULL. @@ -115,9 +117,15 @@ Returns `then` if the `cond` evaluates to be true (greater than zero), otherwise Allows you to write the [CASE](../../sql-reference/operators/index.md#operator_case) operator more compactly in the query. -Syntax: `multiIf(cond_1, then_1, cond_2, then_2, ..., else)` +**Syntax** -**Arguments:** +``` sql +multiIf(cond_1, then_1, cond_2, then_2, ..., else) +``` + +You can use the [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) setting to calculate the `multiIf` function according to a short scheme. If this setting is enabled, `then_i` expression is evaluated only on rows where `((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}) AND cond_i)` is true, `cond_i` will be evaluated only on rows where `((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}))` is true. For example, an exception about division by zero is not thrown when executing the query `SELECT multiIf(number = 2, intDiv(1, number), number = 5) FROM numbers(10)`. + +**Arguments** - `cond_N` — The condition for the function to return `then_N`. - `then_N` — The result of the function when executed. @@ -201,4 +209,3 @@ FROM LEFT_RIGHT │ 4 │ ᴺᵁᴸᴸ │ Both equal │ └──────┴───────┴──────────────────┘ ``` - diff --git a/docs/en/sql-reference/functions/encoding-functions.md b/docs/en/sql-reference/functions/encoding-functions.md index c22f041e0c3..69dd14da1bf 100644 --- a/docs/en/sql-reference/functions/encoding-functions.md +++ b/docs/en/sql-reference/functions/encoding-functions.md @@ -87,7 +87,23 @@ The function is using uppercase letters `A-F` and not using any prefixes (like ` For integer arguments, it prints hex digits (“nibbles”) from the most significant to least significant (big-endian or “human-readable” order). It starts with the most significant non-zero byte (leading zero bytes are omitted) but always prints both digits of every byte even if the leading digit is zero. -**Example** +Values of type [Date](../../sql-reference/data-types/date.md) and [DateTime](../../sql-reference/data-types/datetime.md) are formatted as corresponding integers (the number of days since Epoch for Date and the value of Unix Timestamp for DateTime). + +For [String](../../sql-reference/data-types/string.md) and [FixedString](../../sql-reference/data-types/fixedstring.md), all bytes are simply encoded as two hexadecimal numbers. Zero bytes are not omitted. + +Values of [Float](../../sql-reference/data-types/float.md) and [Decimal](../../sql-reference/data-types/decimal.md) types are encoded as their representation in memory. As we support little-endian architecture, they are encoded in little-endian. Zero leading/trailing bytes are not omitted. + +**Arguments** + +- `arg` — A value to convert to hexadecimal. Types: [String](../../sql-reference/data-types/string.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md) or [DateTime](../../sql-reference/data-types/datetime.md). + +**Returned value** + +- A string with the hexadecimal representation of the argument. + +Type: [String](../../sql-reference/data-types/string.md). + +**Examples** Query: @@ -101,28 +117,10 @@ Result: 01 ``` -Values of type `Date` and `DateTime` are formatted as corresponding integers (the number of days since Epoch for Date and the value of Unix Timestamp for DateTime). - -For `String` and `FixedString`, all bytes are simply encoded as two hexadecimal numbers. Zero bytes are not omitted. - -Values of floating point and Decimal types are encoded as their representation in memory. As we support little-endian architecture, they are encoded in little-endian. Zero leading/trailing bytes are not omitted. - -**Arguments** - -- `arg` — A value to convert to hexadecimal. Types: [String](../../sql-reference/data-types/string.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md) or [DateTime](../../sql-reference/data-types/datetime.md). - -**Returned value** - -- A string with the hexadecimal representation of the argument. - -Type: `String`. - -**Example** - Query: ``` sql -SELECT hex(toFloat32(number)) as hex_presentation FROM numbers(15, 2); +SELECT hex(toFloat32(number)) AS hex_presentation FROM numbers(15, 2); ``` Result: @@ -137,7 +135,7 @@ Result: Query: ``` sql -SELECT hex(toFloat64(number)) as hex_presentation FROM numbers(15, 2); +SELECT hex(toFloat64(number)) AS hex_presentation FROM numbers(15, 2); ``` Result: @@ -210,52 +208,52 @@ Result: Returns a string containing the argument’s binary representation. -Alias: `BIN`. - **Syntax** ``` sql bin(arg) ``` +Alias: `BIN`. + For integer arguments, it prints bin digits from the most significant to least significant (big-endian or “human-readable” order). It starts with the most significant non-zero byte (leading zero bytes are omitted) but always prints eight digits of every byte if the leading digit is zero. -**Example** +Values of type [Date](../../sql-reference/data-types/date.md) and [DateTime](../../sql-reference/data-types/datetime.md) are formatted as corresponding integers (the number of days since Epoch for `Date` and the value of Unix Timestamp for `DateTime`). -Query: +For [String](../../sql-reference/data-types/string.md) and [FixedString](../../sql-reference/data-types/fixedstring.md), all bytes are simply encoded as eight binary numbers. Zero bytes are not omitted. -``` sql -SELECT bin(1); -``` - -Result: - -``` text -00000001 -``` - -Values of type `Date` and `DateTime` are formatted as corresponding integers (the number of days since Epoch for Date and the value of Unix Timestamp for DateTime). - -For `String` and `FixedString`, all bytes are simply encoded as eight binary numbers. Zero bytes are not omitted. - -Values of floating-point and Decimal types are encoded as their representation in memory. As we support little-endian architecture, they are encoded in little-endian. Zero leading/trailing bytes are not omitted. +Values of [Float](../../sql-reference/data-types/float.md) and [Decimal](../../sql-reference/data-types/decimal.md) types are encoded as their representation in memory. As we support little-endian architecture, they are encoded in little-endian. Zero leading/trailing bytes are not omitted. **Arguments** -- `arg` — A value to convert to binary. Types: [String](../../sql-reference/data-types/string.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md) or [DateTime](../../sql-reference/data-types/datetime.md). +- `arg` — A value to convert to binary. [String](../../sql-reference/data-types/string.md), [FixedString](../../sql-reference/data-types/fixedstring.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md), or [DateTime](../../sql-reference/data-types/datetime.md). **Returned value** - A string with the binary representation of the argument. -Type: `String`. +Type: [String](../../sql-reference/data-types/string.md). -**Example** +**Examples** Query: ``` sql -SELECT bin(toFloat32(number)) as bin_presentation FROM numbers(15, 2); +SELECT bin(14); +``` + +Result: + +``` text +┌─bin(14)──┐ +│ 00001110 │ +└──────────┘ +``` + +Query: + +``` sql +SELECT bin(toFloat32(number)) AS bin_presentation FROM numbers(15, 2); ``` Result: @@ -270,7 +268,7 @@ Result: Query: ``` sql -SELECT bin(toFloat64(number)) as bin_presentation FROM numbers(15, 2); +SELECT bin(toFloat64(number)) AS bin_presentation FROM numbers(15, 2); ``` Result: @@ -284,14 +282,7 @@ Result: ## unbin {#unbinstr} -Performs the opposite operation of [bin](#bin). It interprets each pair of binary digits (in the argument) as a number and converts it to the byte represented by the number. The return value is a binary string (BLOB). - -If you want to convert the result to a number, you can use the [reverse](../../sql-reference/functions/string-functions.md#reverse) and [reinterpretAs](../../sql-reference/functions/type-conversion-functions.md#type-conversion-functions) functions. - -!!! note "Note" - If `unbin` is invoked from within the `clickhouse-client`, binary strings display using UTF-8. - -Alias: `UNBIN`. +Interprets each pair of binary digits (in the argument) as a number and converts it to the byte represented by the number. The functions performs the opposite operation to [bin](#bin). **Syntax** @@ -299,11 +290,18 @@ Alias: `UNBIN`. unbin(arg) ``` +Alias: `UNBIN`. + +For a numeric argument `unbin()` does not return the inverse of `bin()`. If you want to convert the result to a number, you can use the [reverse](../../sql-reference/functions/string-functions.md#reverse) and [reinterpretAs](../../sql-reference/functions/type-conversion-functions.md#reinterpretasuint8163264) functions. + +!!! note "Note" + If `unbin` is invoked from within the `clickhouse-client`, binary strings are displayed using UTF-8. + +Supports binary digits `0` and `1`. The number of binary digits does not have to be multiples of eight. If the argument string contains anything other than binary digits, some implementation-defined result is returned (an exception isn’t thrown). + **Arguments** -- `arg` — A string containing any number of binary digits. Type: [String](../../sql-reference/data-types/string.md). - -Supports binary digits `0-1`. The number of binary digits does not have to be multiples of eight. If the argument string contains anything other than binary digits, some implementation-defined result is returned (an exception isn’t thrown). For a numeric argument the inverse of bin(N) is not performed by unbin(). +- `arg` — A string containing any number of binary digits. [String](../../sql-reference/data-types/string.md). **Returned value** @@ -311,7 +309,7 @@ Supports binary digits `0-1`. The number of binary digits does not have to be mu Type: [String](../../sql-reference/data-types/string.md). -**Example** +**Examples** Query: @@ -330,14 +328,14 @@ Result: Query: ``` sql -SELECT reinterpretAsUInt64(reverse(unbin('1010'))) AS num; +SELECT reinterpretAsUInt64(reverse(unbin('1110'))) AS num; ``` Result: ``` text ┌─num─┐ -│ 10 │ +│ 14 │ └─────┘ ``` @@ -396,7 +394,7 @@ Result: Query: ``` sql -select bitPositionsToArray(toInt8(-1)) as bit_positions; +SELECT bitPositionsToArray(toInt8(-1)) AS bit_positions; ``` Result: diff --git a/docs/en/sql-reference/functions/encryption-functions.md b/docs/en/sql-reference/functions/encryption-functions.md index 8dc59c65904..ea4d0f84488 100644 --- a/docs/en/sql-reference/functions/encryption-functions.md +++ b/docs/en/sql-reference/functions/encryption-functions.md @@ -358,4 +358,4 @@ Result: └───────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/encryption_functions/) +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/encryption_functions/) diff --git a/docs/en/sql-reference/functions/geo/coordinates.md b/docs/en/sql-reference/functions/geo/coordinates.md index 2d9bb41fc27..b0862dded67 100644 --- a/docs/en/sql-reference/functions/geo/coordinates.md +++ b/docs/en/sql-reference/functions/geo/coordinates.md @@ -144,4 +144,4 @@ SELECT pointInPolygon((3., 3.), [(6, 0), (8, 4), (5, 8), (0, 2)]) AS res ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/geo/coordinates) +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/coordinates) diff --git a/docs/en/sql-reference/functions/geo/geohash.md b/docs/en/sql-reference/functions/geo/geohash.md index 5fbd286eba6..1192ed5f56a 100644 --- a/docs/en/sql-reference/functions/geo/geohash.md +++ b/docs/en/sql-reference/functions/geo/geohash.md @@ -109,4 +109,4 @@ Result: └─────────────────────────────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/geo/geohash) +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/geohash) diff --git a/docs/en/sql-reference/functions/geo/h3.md b/docs/en/sql-reference/functions/geo/h3.md index ad7b4657af7..3c3ed7b8932 100644 --- a/docs/en/sql-reference/functions/geo/h3.md +++ b/docs/en/sql-reference/functions/geo/h3.md @@ -229,6 +229,42 @@ Result: └───────────────────────────────────────┘ ``` +## h3ToGeoBoundary {#h3togeoboundary} + +Returns array of pairs `(lon, lat)`, which corresponds to the boundary of the provided H3 index. + +**Syntax** + +``` sql +h3ToGeoBoundary(h3Index) +``` + +**Arguments** + +- `h3Index` — H3 Index. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- Array of pairs '(lon, lat)'. +Type: [Array](../../../sql-reference/data-types/array.md)([Float64](../../../sql-reference/data-types/float.md), [Float64](../../../sql-reference/data-types/float.md)). + + +**Example** + +Query: + +``` sql +SELECT h3ToGeoBoundary(644325524701193974) AS coordinates; +``` + +Result: + +``` text +┌─h3ToGeoBoundary(599686042433355775)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ [(37.2713558667319,-121.91508032705622),(37.353926450852256,-121.8622232890249),(37.42834118609435,-121.92354999630156),(37.42012867767779,-122.03773496427027),(37.33755608435299,-122.090428929044),(37.26319797461824,-122.02910130919001)] │ +└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + ## h3kRing {#h3kring} Lists all the [H3](#h3index) hexagons in the raduis of `k` from the given hexagon in random order. @@ -558,4 +594,114 @@ Result: └─────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/geo/h3) +## h3IsResClassIII {#h3isresclassIII} + +Returns whether [H3](#h3index) index has a resolution with Class III orientation. + +**Syntax** + +``` sql +h3IsResClassIII(index) +``` + +**Parameter** + +- `index` — Hexagon index number. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned value** + +- `1` — Index has a resolution with Class III orientation. +- `0` — Index doesn't have a resolution with Class III orientation. + +Type: [UInt8](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT h3IsResClassIII(617420388352917503) as res; +``` + +Result: + +``` text +┌─res─┐ +│ 1 │ +└─────┘ +``` + +## h3IsPentagon {#h3ispentagon } + +Returns whether this [H3](#h3index) index represents a pentagonal cell. + +**Syntax** + +``` sql +h3IsPentagon(index) +``` + +**Parameter** + +- `index` — Hexagon index number. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned value** + +- `1` — Index represents a pentagonal cell. +- `0` — Index doesn't represent a pentagonal cell. + +Type: [UInt8](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT SELECT h3IsPentagon(644721767722457330) as pentagon; +``` + +Result: + +``` text +┌─pentagon─┐ +│ 0 │ +└──────────┘ +``` + +## h3GetFaces {#h3getfaces} + +Returns icosahedron faces intersected by a given [H3](#h3index) index. + +**Syntax** + +``` sql +h3GetFaces(index) +``` + +**Parameter** + +- `index` — Hexagon index number. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- Array containing icosahedron faces intersected by a given H3 index. + +Type: [Array](../../../sql-reference/data-types/array.md)([UInt64](../../../sql-reference/data-types/int-uint.md)). + +**Example** + +Query: + +``` sql +SELECT SELECT h3GetFaces(599686042433355775) as faces; +``` + +Result: + +``` text +┌─faces─┐ +│ [7] │ +└───────┘ +``` + +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/h3) diff --git a/docs/en/sql-reference/functions/geo/index.md b/docs/en/sql-reference/functions/geo/index.md index 10b42332ece..65bf2ab83cb 100644 --- a/docs/en/sql-reference/functions/geo/index.md +++ b/docs/en/sql-reference/functions/geo/index.md @@ -5,4 +5,4 @@ toc_folder_title: Geo --- -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/geo/) +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/) diff --git a/docs/en/sql-reference/functions/geo/s2.md b/docs/en/sql-reference/functions/geo/s2.md new file mode 100644 index 00000000000..d669b1c8b32 --- /dev/null +++ b/docs/en/sql-reference/functions/geo/s2.md @@ -0,0 +1,386 @@ +--- +toc_title: S2 Geometry +--- + +# Functions for Working with S2 Index {#s2Index} + +[S2](https://s2geometry.io/) is a geographical indexing system where all geographical data is represented on a three-dimensional sphere (similar to a globe). + +In the S2 library points are represented as unit length vectors called S2 point indices (points on the surface of a three dimensional unit sphere) as opposed to traditional (latitude, longitude) pairs. + +## geoToS2 {#geoToS2} + +Returns [S2](#s2index) point index corresponding to the provided coordinates `(longitude, latitude)`. + +**Syntax** + +``` sql +geoToS2(lon, lat) +``` + +**Arguments** + +- `lon` — Longitude. [Float64](../../../sql-reference/data-types/float.md). +- `lat` — Latitude. [Float64](../../../sql-reference/data-types/float.md). + +**Returned values** + +- S2 point index. + +Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT geoToS2(37.79506683, 55.71290588) as s2Index; +``` + +Result: + +``` text +┌─────────────s2Index─┐ +│ 4704772434919038107 │ +└─────────────────────┘ +``` + +## s2ToGeo {#s2ToGeo} + +Returns geo coordinates `(longitude, latitude)` corresponding to the provided [S2](#s2index) point index. + +**Syntax** + +``` sql +s2ToGeo(s2index) +``` + +**Arguments** + +- `s2Index` — S2 Index. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- A tuple consisting of two values: `tuple(lon,lat)`. + +Type: `lon` - [Float64](../../../sql-reference/data-types/float.md). `lat` — [Float64](../../../sql-reference/data-types/float.md). + +**Example** + +Query: + +``` sql +SELECT s2ToGeo(4704772434919038107) as s2Coodrinates; +``` + +Result: + +``` text +┌─s2Coodrinates────────────────────────┐ +│ (37.79506681471008,55.7129059052841) │ +└──────────────────────────────────────┘ +``` + +## s2GetNeighbors {#s2GetNeighbors} + +Returns S2 neighbor indices corresponding to the provided [S2](#s2index)). Each cell in the S2 system is a quadrilateral bounded by four geodesics. So, each cell has 4 neighbors. + +**Syntax** + +``` sql +s2GetNeighbors(s2index) +``` + +**Arguments** + +- `s2index` — S2 Index. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- An array consisting of the 4 neighbor indices: `array[s2index1, s2index3, s2index2, s2index4]`. + +Type: Each S2 index is [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql + select s2GetNeighbors(5074766849661468672) AS s2Neighbors; +``` + +Result: + +``` text +┌─s2Neighbors───────────────────────────────────────────────────────────────────────┐ +│ [5074766987100422144,5074766712222515200,5074767536856236032,5074767261978329088] │ +└───────────────────────────────────────────────────────────────────────────────────┘ +``` + +## s2CellsIntersect {#s2CellsIntersect} + +Determines if the two provided [S2](#s2index)) cell indices intersect or not. + +**Syntax** + +``` sql +s2CellsIntersect(s2index1, s2index2) +``` + +**Arguments** + +- `siIndex1`, `s2index2` — S2 Index. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- 1 — If the S2 cell indices intersect. +- 0 — If the S2 cell indices don't intersect. + +Type: [UInt8](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql + select s2CellsIntersect(9926595209846587392, 9926594385212866560) as intersect; +``` + +Result: + +``` text +┌─intersect─┐ +│ 1 │ +└───────────┘ +``` + +## s2CapContains {#s2CapContains} + +A cap represents a portion of the sphere that has been cut off by a plane. It is defined by a point on a sphere and a radius in degrees. + +Determines if a cap contains a s2 point index. + +**Syntax** + +``` sql +s2CapContains(center, degrees, point) +``` + +**Arguments** + +- `center` - S2 point index corresponding to the cap. [UInt64](../../../sql-reference/data-types/int-uint.md). + - `degrees` - Radius of the cap in degrees. [Float64](../../../sql-reference/data-types/float.md). + - `point` - S2 point index. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- 1 — If the cap contains the S2 point index. +- 0 — If the cap doesn't contain the S2 point index. + +Type: [UInt8](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +select s2CapContains(1157339245694594829, 1.0, 1157347770437378819) as capContains; +``` + +Result: + +``` text +┌─capContains─┐ +│ 1 │ +└─────────────┘ +``` + +## s2CapUnion {#s2CapUnion} + +A cap represents a portion of the sphere that has been cut off by a plane. It is defined by a point on a sphere and a radius in degrees. + +Determines the smallest cap that contains the given two input caps. + +**Syntax** + +``` sql +s2CapUnion(center1, radius1, center2, radius2) +``` + +**Arguments** + +- `center1`, `center2` - S2 point indices corresponding to the two input caps. [UInt64](../../../sql-reference/data-types/int-uint.md). + - `radius1`, `radius2` - Radii of the two input caps in degrees. [Float64](../../../sql-reference/data-types/float.md). + +**Returned values** + +- `center` - S2 point index corresponding the center of the smallest cap containing the two input caps. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + - `radius` - Radius of the smallest cap containing the two input caps. Type: [Float64](../../../sql-reference/data-types/float.md). + +**Example** + +Query: + +``` sql +SELECT s2CapUnion(3814912406305146967, 1.0, 1157347770437378819, 1.0) AS capUnion; +``` + +Result: + +``` text +┌─capUnion───────────────────────────────┐ +│ (4534655147792050737,60.2088283994957) │ +└────────────────────────────────────────┘ +``` + +## s2RectAdd{#s2RectAdd} + +In the S2 system, a rectangle is represented by a type of S2Region called a S2LatLngRect that represents a rectangle in latitude-longitude space. + +Increases the size of the bounding rectangle to include the given S2 point index. + +**Syntax** + +``` sql +s2RectAdd(s2pointLow, s2pointHigh, s2Point) +``` + +**Arguments** + +- `s2PointLow` - Low S2 point index corresponding to the rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2PointHigh` - High S2 point index corresponding to the rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2Point` - Target S2 point index that the bound rectangle should be grown to include. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- `s2PointLow` - Low S2 cell id corresponding to the grown rectangle. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + - `s2PointHigh` - Hight S2 cell id corresponding to the grown rectangle. Type: [UInt64](../../../sql-reference/data-types/float.md). + +**Example** + +Query: + +``` sql +SELECT s2RectAdd(5178914411069187297, 5177056748191934217, 5179056748191934217) as rectAdd; +``` + +Result: + +``` text +┌─rectAdd───────────────────────────────────┐ +│ (5179062030687166815,5177056748191934217) │ +└───────────────────────────────────────────┘ +``` + +## s2RectContains{#s2RectContains} + +In the S2 system, a rectangle is represented by a type of S2Region called a S2LatLngRect that represents a rectangle in latitude-longitude space. + +Determines if a given rectangle contains a S2 point index. + +**Syntax** + +``` sql +s2RectContains(s2PointLow, s2PointHi, s2Point) +``` + +**Arguments** + +- `s2PointLow` - Low S2 point index corresponding to the rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2PointHigh` - High S2 point index corresponding to the rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2Point` - Target S2 point index. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- 1 — If the rectangle contains the given S2 point. +- 0 — If the rectangle doesn't contain the given S2 point. + +**Example** + +Query: + +``` sql +SELECT s2RectContains(5179062030687166815, 5177056748191934217, 5177914411069187297) AS rectContains +``` + +Result: + +``` text +┌─rectContains─┐ +│ 0 │ +└──────────────┘ +``` + +## s2RectUinion{#s2RectUnion} + +In the S2 system, a rectangle is represented by a type of S2Region called a S2LatLngRect that represents a rectangle in latitude-longitude space. + +Returns the smallest rectangle containing the union of this rectangle and the given rectangle. + +**Syntax** + +``` sql +s2RectUnion(s2Rect1PointLow, s2Rect1PointHi, s2Rect2PointLow, s2Rect2PointHi) +``` + +**Arguments** + +- `s2Rect1PointLow`, `s2Rect1PointHi` - Low and High S2 point indices corresponding to the first rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2Rect2PointLow`, `s2Rect2PointHi` - Low and High S2 point indices corresponding to the second rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- `s2UnionRect2PointLow` - Low S2 cell id corresponding to the union rectangle. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2UnionRect2PointHi` - High S2 cell id corresponding to the union rectangle. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT s2RectUnion(5178914411069187297, 5177056748191934217, 5179062030687166815, 5177056748191934217) AS rectUnion +``` + +Result: + +``` text +┌─rectUnion─────────────────────────────────┐ +│ (5179062030687166815,5177056748191934217) │ +└───────────────────────────────────────────┘ +``` + +## s2RectIntersection{#s2RectIntersection} + +Returns the smallest Rectangle containing the intersection of this rectangle and the given rectangle. + +**Syntax** + +``` sql +s2RectIntersection(s2Rect1PointLow, s2Rect1PointHi, s2Rect2PointLow, s2Rect2PointHi) +``` + +**Arguments** + +- `s2Rect1PointLow`, `s2Rect1PointHi` - Low and High S2 point indices corresponding to the first rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2Rect2PointLow`, `s2Rect2PointHi` - Low and High S2 point indices corresponding to the second rectangle. [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Returned values** + +- `s2UnionRect2PointLow` - Low S2 cell id corresponding to the rectangle containing the intersection of the given rectangles. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). +- `s2UnionRect2PointHi` - Hi S2 cell id corresponding to the rectangle containing the intersection of the given rectangles. Type: [UInt64](../../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT s2RectIntersection(5178914411069187297, 5177056748191934217, 5179062030687166815, 5177056748191934217) AS rectIntersection +``` + +Result: + +``` text +┌─rectIntersection──────────────────────────┐ +│ (5178914411069187297,5177056748191934217) │ +└───────────────────────────────────────────┘ +``` diff --git a/docs/en/sql-reference/functions/hash-functions.md b/docs/en/sql-reference/functions/hash-functions.md index 35a42c49a41..d3977cee9df 100644 --- a/docs/en/sql-reference/functions/hash-functions.md +++ b/docs/en/sql-reference/functions/hash-functions.md @@ -40,6 +40,10 @@ SELECT halfMD5(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00') └────────────────────┴────────┘ ``` +## MD4 {#hash_functions-md4} + +Calculates the MD4 from a string and returns the resulting set of bytes as FixedString(16). + ## MD5 {#hash_functions-md5} Calculates the MD5 from a string and returns the resulting set of bytes as FixedString(16). @@ -143,7 +147,11 @@ It works faster than intHash32. Average quality. ## SHA256 {#sha256} -Calculates SHA-1, SHA-224, or SHA-256 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), or FixedString(32). +## SHA384 {#sha384} + +## SHA512 {#sha512} + +Calculates SHA-1, SHA-224, SHA-256, SHA-384 or SHA-512 from a string and returns the resulting set of bytes as FixedString(20), FixedString(28), FixedString(32), FixedString(48) or FixedString(64). The function works fairly slowly (SHA-1 processes about 5 million short strings per second per processor core, while SHA-224 and SHA-256 process about 2.2 million). We recommend using this function only in cases when you need a specific hash function and you can’t select it. Even in these cases, we recommend applying the function offline and pre-calculating values when inserting them into the table, instead of applying it in SELECTS. diff --git a/docs/en/sql-reference/functions/index.md b/docs/en/sql-reference/functions/index.md index 54afd461e1d..e86e6b37998 100644 --- a/docs/en/sql-reference/functions/index.md +++ b/docs/en/sql-reference/functions/index.md @@ -59,6 +59,69 @@ A lambda function that accepts multiple arguments can also be passed to a higher For some functions the first argument (the lambda function) can be omitted. In this case, identical mapping is assumed. +## SQL User Defined Functions {#user-defined-functions} + +Custom functions from lambda expressions can be created using the [CREATE FUNCTION](../statements/create/function.md) statement. To delete these functions use the [DROP FUNCTION](../statements/drop.md#drop-function) statement. + +## Executable User Defined Functions {#executable-user-defined-functions} +ClickHouse can call any external executable program or script to process data. Describe such functions in a [configuration file](../../operations/configuration-files.md) and add the path of that file to the main configuration in `user_defined_executable_functions_config` setting. If a wildcard symbol `*` is used in the path, then all files matching the pattern are loaded. Example: +``` xml +*_function.xml +``` +User defined function configurations are searched relative to the path specified in the `user_files_path` setting. + +A function configuration contains the following settings: + +- `name` - a function name. +- `command` - a command or a script to execute. +- `argument` - argument description with the `type` of an argument. Each argument is described in a separate setting. +- `format` - a [format](../../interfaces/formats.md) in which arguments are passed to the command. +- `return_type` - the type of a returned value. +- `type` - an executable type. If `type` is set to `executable` then single command is started. If it is set to `executable_pool` then a pool of commands is created. +- `max_command_execution_time` - maximum execution time in seconds for processing block of data. This setting is valid for `executable_pool` commands only. Optional. Default value is `10`. +- `command_termination_timeout` - time in seconds during which a command should finish after its pipe is closed. After that time `SIGTERM` is sent to the process executing the command. This setting is valid for `executable_pool` commands only. Optional. Default value is `10`. +- `pool_size` - the size of a command pool. Optional. Default value is `16`. +- `lifetime` - the reload interval of a function in seconds. If it is set to `0` then the function is not reloaded. +- `send_chunk_header` - controls whether to send row count before sending a chunk of data to process. Optional. Default value is `false`. + +The command must read arguments from `STDIN` and must output the result to `STDOUT`. The command must process arguments iteratively. That is after processing a chunk of arguments it must wait for the next chunk. + +**Example** +Creating `test_function` using XML configuration: +``` + + + executable + test_function + UInt64 + + UInt64 + + + UInt64 + + TabSeparated + cd /; clickhouse-local --input-format TabSeparated --output-format TabSeparated --structure 'x UInt64, y UInt64' --query "SELECT x + y FROM table" + 0 + + +``` + +Query: + +``` sql +SELECT test_function(toUInt64(2), toUInt64(2)); +``` + +Result: + +``` text +┌─test_function(toUInt64(2), toUInt64(2))─┐ +│ 4 │ +└─────────────────────────────────────────┘ +``` + + ## Error Handling {#error-handling} Some functions might throw an exception if the data is invalid. In this case, the query is canceled and an error text is returned to the client. For distributed processing, when an exception occurs on one of the servers, the other servers also attempt to abort the query. diff --git a/docs/en/sql-reference/functions/introspection.md b/docs/en/sql-reference/functions/introspection.md index 44685e3cb67..21b570c65d4 100644 --- a/docs/en/sql-reference/functions/introspection.md +++ b/docs/en/sql-reference/functions/introspection.md @@ -308,7 +308,7 @@ clone ``` ## tid {#tid} -Returns id of the thread, in which current [Block](https://clickhouse.tech/docs/en/development/architecture/#block) is processed. +Returns id of the thread, in which current [Block](https://clickhouse.com/docs/en/development/architecture/#block) is processed. **Syntax** @@ -338,7 +338,7 @@ Result: ## logTrace {#logtrace} -Emits trace log message to server log for each [Block](https://clickhouse.tech/docs/en/development/architecture/#block). +Emits trace log message to server log for each [Block](https://clickhouse.com/docs/en/development/architecture/#block). **Syntax** diff --git a/docs/en/sql-reference/functions/logical-functions.md b/docs/en/sql-reference/functions/logical-functions.md index 965ed97f20c..dcdb01e2059 100644 --- a/docs/en/sql-reference/functions/logical-functions.md +++ b/docs/en/sql-reference/functions/logical-functions.md @@ -19,6 +19,8 @@ Calculates the result of the logical conjunction between two or more values. Cor and(val1, val2...) ``` +You can use the [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) setting to calculate the `and` function according to a short scheme. If this setting is enabled, `vali` is evaluated only on rows where `(val1 AND val2 AND ... AND val{i-1})` is true. For example, an exception about division by zero is not thrown when executing the query `SELECT and(number = 2, intDiv(1, number)) FROM numbers(10)`. + **Arguments** - `val1, val2, ...` — List of at least two values. [Int](../../sql-reference/data-types/int-uint.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md) or [Nullable](../../sql-reference/data-types/nullable.md). @@ -68,9 +70,11 @@ Calculates the result of the logical disjunction between two or more values. Cor **Syntax** ``` sql -and(val1, val2...) +or(val1, val2...) ``` +You can use the [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation) setting to calculate the `or` function according to a short scheme. If this setting is enabled, `vali` is evaluated only on rows where `((NOT val1) AND (NOT val2) AND ... AND (NOT val{i-1}))` is true. For example, an exception about division by zero is not thrown when executing the query `SELECT or(number = 0, intDiv(1, number) != 0) FROM numbers(10)`. + **Arguments** - `val1, val2, ...` — List of at least two values. [Int](../../sql-reference/data-types/int-uint.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md) or [Nullable](../../sql-reference/data-types/nullable.md). diff --git a/docs/en/sql-reference/functions/other-functions.md b/docs/en/sql-reference/functions/other-functions.md index 577fdd668a2..cc5c20877ac 100644 --- a/docs/en/sql-reference/functions/other-functions.md +++ b/docs/en/sql-reference/functions/other-functions.md @@ -1201,7 +1201,7 @@ SELECT * FROM table WHERE indexHint() **Returned value** -1. Type: [Uint8](https://clickhouse.yandex/docs/en/data_types/int_uint/#diapazony-uint). +1. Type: [Uint8](https://clickhouse.com/docs/en/data_types/int_uint/#diapazony-uint). **Example** @@ -2236,3 +2236,121 @@ defaultRoles() Type: [Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md)). +## getServerPort {#getserverport} + +Returns the number of the server port. When the port is not used by the server, throws an exception. + +**Syntax** + +``` sql +getServerPort(port_name) +``` + +**Arguments** + +- `port_name` — The name of the server port. [String](../../sql-reference/data-types/string.md#string). Possible values: + + - 'tcp_port' + - 'tcp_port_secure' + - 'http_port' + - 'https_port' + - 'interserver_http_port' + - 'interserver_https_port' + - 'mysql_port' + - 'postgresql_port' + - 'grpc_port' + - 'prometheus.port' + +**Returned value** + +- The number of the server port. + +Type: [UInt16](../../sql-reference/data-types/int-uint.md). + +**Example** + +Query: + +``` sql +SELECT getServerPort('tcp_port'); +``` + +Result: + +``` text +┌─getServerPort('tcp_port')─┐ +│ 9000 │ +└───────────────────────────┘ +``` + +## queryID {#query-id} + +Returns the ID of the current query. Other parameters of a query can be extracted from the [system.query_log](../../operations/system-tables/query_log.md) table via `query_id`. + +In contrast to [initialQueryID](#initial-query-id) function, `queryID` can return different results on different shards (see example). + +**Syntax** + +``` sql +queryID() +``` + +**Returned value** + +- The ID of the current query. + +Type: [String](../../sql-reference/data-types/string.md) + +**Example** + +Query: + +``` sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +Result: + +``` text +┌─count()─┐ +│ 3 │ +└─────────┘ +``` + +## initialQueryID {#initial-query-id} + +Returns the ID of the initial current query. Other parameters of a query can be extracted from the [system.query_log](../../operations/system-tables/query_log.md) table via `initial_query_id`. + +In contrast to [queryID](#query-id) function, `initialQueryID` returns the same results on different shards (see example). + +**Syntax** + +``` sql +initialQueryID() +``` + +**Returned value** + +- The ID of the initial current query. + +Type: [String](../../sql-reference/data-types/string.md) + +**Example** + +Query: + +``` sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT initialQueryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +Result: + +``` text +┌─count()─┐ +│ 1 │ +└─────────┘ +``` diff --git a/docs/en/sql-reference/functions/rounding-functions.md b/docs/en/sql-reference/functions/rounding-functions.md index 5f74c6329d1..ad92ba502e1 100644 --- a/docs/en/sql-reference/functions/rounding-functions.md +++ b/docs/en/sql-reference/functions/rounding-functions.md @@ -29,7 +29,7 @@ Returns the round number with largest absolute value that has an absolute value Rounds a value to a specified number of decimal places. -The function returns the nearest number of the specified order. In case when given number has equal distance to surrounding numbers, the function uses banker’s rounding for float number types and rounds away from zero for the other number types. +The function returns the nearest number of the specified order. In case when given number has equal distance to surrounding numbers, the function uses banker’s rounding for float number types and rounds away from zero for the other number types (Decimal). ``` sql round(expression [, decimal_places]) @@ -49,7 +49,7 @@ The rounded number of the same type as the input number. ### Examples {#examples} -**Example of use** +**Example of use with Float** ``` sql SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3 @@ -63,6 +63,20 @@ SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3 └─────┴──────────────────────────┘ ``` +**Example of use with Decimal** + +``` sql +SELECT cast(number / 2 AS Decimal(10,4)) AS x, round(x) FROM system.numbers LIMIT 3 +``` + +``` text +┌──────x─┬─round(CAST(divide(number, 2), 'Decimal(10, 4)'))─┐ +│ 0.0000 │ 0.0000 │ +│ 0.5000 │ 1.0000 │ +│ 1.0000 │ 1.0000 │ +└────────┴──────────────────────────────────────────────────┘ +``` + **Examples of rounding** Rounding to the nearest number. @@ -162,7 +176,7 @@ roundBankers(4.5) = 4 roundBankers(3.55, 1) = 3.6 roundBankers(3.65, 1) = 3.6 roundBankers(10.35, 1) = 10.4 -roundBankers(10.755, 2) = 11,76 +roundBankers(10.755, 2) = 10.76 ``` **See Also** diff --git a/docs/en/sql-reference/functions/string-search-functions.md b/docs/en/sql-reference/functions/string-search-functions.md index d3b4fc908cc..a036482463a 100644 --- a/docs/en/sql-reference/functions/string-search-functions.md +++ b/docs/en/sql-reference/functions/string-search-functions.md @@ -502,7 +502,7 @@ The same thing as ‘like’, but negative. ## ilike {#ilike} -Case insensitive variant of [like](https://clickhouse.tech/docs/en/sql-reference/functions/string-search-functions/#function-like) function. You can use `ILIKE` operator instead of the `ilike` function. +Case insensitive variant of [like](https://clickhouse.com/docs/en/sql-reference/functions/string-search-functions/#function-like) function. You can use `ILIKE` operator instead of the `ilike` function. **Syntax** @@ -558,7 +558,7 @@ Result: **See Also** -- [like](https://clickhouse.tech/docs/en/sql-reference/functions/string-search-functions/#function-like) +- [like](https://clickhouse.com/docs/en/sql-reference/functions/string-search-functions/#function-like) ## ngramDistance(haystack, needle) {#ngramdistancehaystack-needle} diff --git a/docs/en/sql-reference/functions/tuple-map-functions.md b/docs/en/sql-reference/functions/tuple-map-functions.md index ef5f5814017..6ddac9a0530 100644 --- a/docs/en/sql-reference/functions/tuple-map-functions.md +++ b/docs/en/sql-reference/functions/tuple-map-functions.md @@ -78,7 +78,7 @@ mapAdd(arg1, arg2 [, ...]) **Arguments** -Arguments are [maps](../../sql-reference/data-types/map.md) or [tuples](../../sql-reference/data-types/tuple.md#tuplet1-t2) of two [arrays](../../sql-reference/data-types/array.md#data-type-array), where items in the first array represent keys, and the second array contains values for the each key. All key arrays should have same type, and all value arrays should contain items which are promote to the one type ([Int64](../../sql-reference/data-types/int-uint.md#int-ranges), [UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges) or [Float64](../../sql-reference/data-types/float.md#float32-float64)). The common promoted type is used as a type for the result array. +Arguments are [maps](../../sql-reference/data-types/map.md) or [tuples](../../sql-reference/data-types/tuple.md#tuplet1-t2) of two [arrays](../../sql-reference/data-types/array.md#data-type-array), where items in the first array represent keys, and the second array contains values for the each key. All key arrays should have same type, and all value arrays should contain items which are promoted to the one type ([Int64](../../sql-reference/data-types/int-uint.md#int-ranges), [UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges) or [Float64](../../sql-reference/data-types/float.md#float32-float64)). The common promoted type is used as a type for the result array. **Returned value** @@ -86,7 +86,7 @@ Arguments are [maps](../../sql-reference/data-types/map.md) or [tuples](../../sq **Example** -Query with a tuple map: +Query with a tuple: ```sql SELECT mapAdd(([toUInt8(1), 2], [1, 1]), ([toUInt8(1), 2], [1, 1])) as res, toTypeName(res) as type; @@ -352,4 +352,4 @@ Result: └──────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/functions/tuple-map-functions/) +[Original article](https://clickhouse.com/docs/en/sql-reference/functions/tuple-map-functions/) diff --git a/docs/en/sql-reference/functions/type-conversion-functions.md b/docs/en/sql-reference/functions/type-conversion-functions.md index ad6edaea312..9b41042c659 100644 --- a/docs/en/sql-reference/functions/type-conversion-functions.md +++ b/docs/en/sql-reference/functions/type-conversion-functions.md @@ -152,6 +152,104 @@ Alias: `DATE`. ## toDateTimeOrNull {#todatetimeornull} +## toDate32 {#todate32} + +Converts the argument to the [Date32](../../sql-reference/data-types/date32.md) data type. If the value is outside the range returns the border values supported by `Date32`. If the argument has [Date](../../sql-reference/data-types/date.md) type, borders of `Date` are taken into account. + +**Syntax** + +``` sql +toDate32(expr) +``` + +**Arguments** + +- `expr` — The value. [String](../../sql-reference/data-types/string.md), [UInt32](../../sql-reference/data-types/int-uint.md) or [Date](../../sql-reference/data-types/date.md). + +**Returned value** + +- A calendar date. + +Type: [Date32](../../sql-reference/data-types/date32.md). + +**Example** + +1. The value is within the range: + +``` sql +SELECT toDate32('1955-01-01') AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32('1925-01-01'))─┐ +│ 1955-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +2. The value is outside the range: + +``` sql +SELECT toDate32('1924-01-01') AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32('1925-01-01'))─┐ +│ 1925-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +3. With `Date`-type argument: + +``` sql +SELECT toDate32(toDate('1924-01-01')) AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32(toDate('1924-01-01')))─┐ +│ 1970-01-01 │ Date32 │ +└────────────┴────────────────────────────────────────────┘ +``` + +## toDate32OrZero {#todate32-or-zero} + +The same as [toDate32](#todate32) but returns the min value of [Date32](../../sql-reference/data-types/date32.md) if invalid argument is received. + +**Example** + +Query: + +``` sql +SELECT toDate32OrZero('1924-01-01'), toDate32OrZero(''); +``` + +Result: + +``` text +┌─toDate32OrZero('1924-01-01')─┬─toDate32OrZero('')─┐ +│ 1925-01-01 │ 1925-01-01 │ +└──────────────────────────────┴────────────────────┘ +``` + +## toDate32OrNull {#todate32-or-null} + +The same as [toDate32](#todate32) but returns `NULL` if invalid argument is received. + +**Example** + +Query: + +``` sql +SELECT toDate32OrNull('1955-01-01'), toDate32OrNull(''); +``` + +Result: + +``` text +┌─toDate32OrNull('1955-01-01')─┬─toDate32OrNull('')─┐ +│ 1955-01-01 │ ᴺᵁᴸᴸ │ +└──────────────────────────────┴────────────────────┘ +``` + ## toDecimal(32\|64\|128\|256) {#todecimal3264128256} Converts `value` to the [Decimal](../../sql-reference/data-types/decimal.md) data type with precision of `S`. The `value` can be a number or a string. The `S` (scale) parameter specifies the number of decimal places. @@ -1340,9 +1438,9 @@ Result: └───────────────────────────────────────────┘ ``` -## snowflakeToDateTime {#snowflakeToDateTime} +## snowflakeToDateTime {#snowflaketodatetime} -Extract time from snowflake id as DateTime format. +Extracts time from [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) as [DateTime](../data-types/datetime.md) format. **Syntax** @@ -1352,12 +1450,12 @@ snowflakeToDateTime(value [, time_zone]) **Parameters** -- `value` — `snowflake id`, Int64 value. +- `value` — Snowflake ID. [Int64](../data-types/int-uint.md). - `time_zone` — [Timezone](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-timezone). The function parses `time_string` according to the timezone. Optional. [String](../../sql-reference/data-types/string.md). **Returned value** -- value converted to the `DateTime` data type. +- Input value converted to the [DateTime](../data-types/datetime.md) data type. **Example** @@ -1376,9 +1474,9 @@ Result: └──────────────────────────────────────────────────────────────────┘ ``` -## snowflakeToDateTime64 {#snowflakeToDateTime64} +## snowflakeToDateTime64 {#snowflaketodatetime64} -Extract time from snowflake id as DateTime64 format. +Extracts time from [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) as [DateTime64](../data-types/datetime64.md) format. **Syntax** @@ -1388,12 +1486,12 @@ snowflakeToDateTime64(value [, time_zone]) **Parameters** -- `value` — `snowflake id`, Int64 value. +- `value` — Snowflake ID. [Int64](../data-types/int-uint.md). - `time_zone` — [Timezone](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-timezone). The function parses `time_string` according to the timezone. Optional. [String](../../sql-reference/data-types/string.md). **Returned value** -- value converted to the `DateTime64` data type. +- Input value converted to the [DateTime64](../data-types/datetime64.md) data type. **Example** @@ -1412,9 +1510,9 @@ Result: └────────────────────────────────────────────────────────────────────┘ ``` -## dateTimeToSnowflake {#dateTimeToSnowflake} +## dateTimeToSnowflake {#datetimetosnowflake} -Convert DateTime to the first snowflake id at the giving time. +Converts [DateTime](../data-types/datetime.md) value to the first [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) at the giving time. **Syntax** @@ -1426,33 +1524,29 @@ dateTimeToSnowflake(value) - `value` — Date and time. [DateTime](../../sql-reference/data-types/datetime.md). - **Returned value** -- `value` converted to the `Int64` data type as the first snowflake id at that time. +- Input value converted to the [Int64](../data-types/int-uint.md) data type as the first Snowflake ID at that time. **Example** Query: ``` sql -WITH toDateTime('2021-08-15 18:57:56', 'Asia/Shanghai') AS dt -SELECT dateTimeToSnowflake(dt); +WITH toDateTime('2021-08-15 18:57:56', 'Asia/Shanghai') AS dt SELECT dateTimeToSnowflake(dt); ``` Result: ``` text - ┌─dateTimeToSnowflake(dt)─┐ │ 1426860702823350272 │ └─────────────────────────┘ ``` +## dateTime64ToSnowflake {#datetime64tosnowflake} -## dateTime64ToSnowflake {#dateTime64ToSnowflake} - -Convert DateTime64 to the first snowflake id at the giving time. +Convert [DateTime64](../data-types/datetime64.md) to the first [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) at the giving time. **Syntax** @@ -1464,18 +1558,16 @@ dateTime64ToSnowflake(value) - `value` — Date and time. [DateTime64](../../sql-reference/data-types/datetime64.md). - **Returned value** -- `value` converted to the `Int64` data type as the first snowflake id at that time. +- Input value converted to the [Int64](../data-types/int-uint.md) data type as the first Snowflake ID at that time. **Example** Query: ``` sql -WITH toDateTime64('2021-08-15 18:57:56.492', 3, 'Asia/Shanghai') AS dt64 -SELECT dateTime64ToSnowflake(dt64); +WITH toDateTime64('2021-08-15 18:57:56.492', 3, 'Asia/Shanghai') AS dt64 SELECT dateTime64ToSnowflake(dt64); ``` Result: @@ -1484,4 +1576,4 @@ Result: ┌─dateTime64ToSnowflake(dt64)─┐ │ 1426860704886947840 │ └─────────────────────────────┘ -``` \ No newline at end of file +``` diff --git a/docs/en/sql-reference/functions/uuid-functions.md b/docs/en/sql-reference/functions/uuid-functions.md index e5ab45bda40..3616b587bf7 100644 --- a/docs/en/sql-reference/functions/uuid-functions.md +++ b/docs/en/sql-reference/functions/uuid-functions.md @@ -245,7 +245,22 @@ SELECT └──────────────────┴──────────────────────────────────────┘ ``` +## serverUUID() {#server-uuid} + +Returns the random and unique UUID, which is generated when the server is first started and stored forever. The result writes to the file `uuid` created in the ClickHouse server directory `/var/lib/clickhouse/`. + +**Syntax** + +```sql +serverUUID() +``` + +**Returned value** + +- The UUID of the server. + +Type: [UUID](../data-types/uuid.md). + ## See Also {#see-also} - [dictGetUUID](../../sql-reference/functions/ext-dict-functions.md#ext_dict_functions-other) - diff --git a/docs/en/sql-reference/index.md b/docs/en/sql-reference/index.md index 07e0cadd3a8..e8fe092e622 100644 --- a/docs/en/sql-reference/index.md +++ b/docs/en/sql-reference/index.md @@ -15,4 +15,4 @@ ClickHouse supports the following types of queries: - [ALTER](../sql-reference/statements/alter/index.md) - [Other types of queries](../sql-reference/statements/index.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/) +[Original article](https://clickhouse.com/docs/en/sql-reference/) diff --git a/docs/en/sql-reference/statements/alter/index.md b/docs/en/sql-reference/statements/alter/index.md index 71333e6fcce..dbf695edf3b 100644 --- a/docs/en/sql-reference/statements/alter/index.md +++ b/docs/en/sql-reference/statements/alter/index.md @@ -5,7 +5,7 @@ toc_title: ALTER ## ALTER {#query_language_queries_alter} -Most `ALTER` queries modify table settings or data: +Most `ALTER TABLE` queries modify table settings or data: - [COLUMN](../../../sql-reference/statements/alter/column.md) - [PARTITION](../../../sql-reference/statements/alter/partition.md) @@ -17,9 +17,14 @@ Most `ALTER` queries modify table settings or data: - [TTL](../../../sql-reference/statements/alter/ttl.md) !!! note "Note" - Most `ALTER` queries are supported only for [\*MergeTree](../../../engines/table-engines/mergetree-family/index.md) tables, as well as [Merge](../../../engines/table-engines/special/merge.md) and [Distributed](../../../engines/table-engines/special/distributed.md). + Most `ALTER TABLE` queries are supported only for [\*MergeTree](../../../engines/table-engines/mergetree-family/index.md) tables, as well as [Merge](../../../engines/table-engines/special/merge.md) and [Distributed](../../../engines/table-engines/special/distributed.md). -While these `ALTER` settings modify entities related to role-based access control: +These `ALTER` statements manipulate views: + +- [ALTER TABLE ... MODIFY QUERY](../../../sql-reference/statements/alter/view.md) — Modifies a [Materialized view](../create/view.md#materialized) structure. +- [ALTER LIVE VIEW](../../../sql-reference/statements/alter/view.md#alter-live-view) — Refreshes a [Live view](../create/view.md#live-view). + +These `ALTER` statements modify entities related to role-based access control: - [USER](../../../sql-reference/statements/alter/user.md) - [ROLE](../../../sql-reference/statements/alter/role.md) @@ -43,7 +48,11 @@ Entries for finished mutations are not deleted right away (the number of preserv For non-replicated tables, all `ALTER` queries are performed synchronously. For replicated tables, the query just adds instructions for the appropriate actions to `ZooKeeper`, and the actions themselves are performed as soon as possible. However, the query can wait for these actions to be completed on all the replicas. -For `ALTER ... ATTACH|DETACH|DROP` queries, you can use the `replication_alter_partitions_sync` setting to set up waiting. Possible values: `0` – do not wait; `1` – only wait for own execution (default); `2` – wait for all. +For all `ALTER` queries, you can use the [replication_alter_partitions_sync](../../../operations/settings/settings.md#replication-alter-partitions-sync) setting to set up waiting. + +You can specify how long (in seconds) to wait for inactive replicas to execute all `ALTER` queries with the [replication_wait_for_inactive_replica_timeout](../../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout) setting. + +!!! info "Note" + For all `ALTER` queries, if `replication_alter_partitions_sync = 2` and some replicas are not active for more than the time, specified in the `replication_wait_for_inactive_replica_timeout` setting, then an exception `UNFINISHED` is thrown. For `ALTER TABLE ... UPDATE|DELETE` queries the synchronicity is defined by the [mutations_sync](../../../operations/settings/settings.md#mutations_sync) setting. - diff --git a/docs/en/sql-reference/statements/alter/index/index.md b/docs/en/sql-reference/statements/alter/index/index.md index fd5657c3666..4e2943d37f3 100644 --- a/docs/en/sql-reference/statements/alter/index/index.md +++ b/docs/en/sql-reference/statements/alter/index/index.md @@ -12,7 +12,7 @@ The following operations are available: - `ALTER TABLE [db].name DROP INDEX name` - Removes index description from tables metadata and deletes index files from disk. -- `ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name` - The query rebuilds the secondary index `name` in the partition `partition_name`. Implemented as a [mutation](../../../../sql-reference/statements/alter/index.md#mutations). +- `ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name` - The query rebuilds the secondary index `name` in the partition `partition_name`. Implemented as a [mutation](../../../../sql-reference/statements/alter/index.md#mutations). To rebuild index over the whole data in the table you need to remove `IN PARTITION` from query. The first two commands are lightweight in a sense that they only change metadata or remove files. diff --git a/docs/en/sql-reference/statements/alter/order-by.md b/docs/en/sql-reference/statements/alter/order-by.md index d41b9a91724..16f9ace206d 100644 --- a/docs/en/sql-reference/statements/alter/order-by.md +++ b/docs/en/sql-reference/statements/alter/order-by.md @@ -11,7 +11,7 @@ ALTER TABLE [db].name [ON CLUSTER cluster] MODIFY ORDER BY new_expression The command changes the [sorting key](../../../engines/table-engines/mergetree-family/mergetree.md) of the table to `new_expression` (an expression or a tuple of expressions). Primary key remains the same. -The command is lightweight in a sense that it only changes metadata. To keep the property that data part rows are ordered by the sorting key expression you cannot add expressions containing existing columns to the sorting key (only columns added by the `ADD COLUMN` command in the same `ALTER` query). +The command is lightweight in a sense that it only changes metadata. To keep the property that data part rows are ordered by the sorting key expression you cannot add expressions containing existing columns to the sorting key (only columns added by the `ADD COLUMN` command in the same `ALTER` query, without default column value). !!! note "Note" It only works for tables in the [`MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md) family (including [replicated](../../../engines/table-engines/mergetree-family/replication.md) tables). diff --git a/docs/en/sql-reference/statements/alter/projection.md b/docs/en/sql-reference/statements/alter/projection.md index 07a13fc23c4..429241ebf13 100644 --- a/docs/en/sql-reference/statements/alter/projection.md +++ b/docs/en/sql-reference/statements/alter/projection.md @@ -5,7 +5,7 @@ toc_title: PROJECTION # Manipulating Projections {#manipulations-with-projections} -The following operations are available: +The following operations with [projections](../../../engines/table-engines/mergetree-family/mergetree.md#projections) are available: - `ALTER TABLE [db].name ADD PROJECTION name AS SELECT [GROUP BY] [ORDER BY]` - Adds projection description to tables metadata. @@ -15,7 +15,7 @@ The following operations are available: - `ALTER TABLE [db.]table CLEAR PROJECTION name IN PARTITION partition_name` - Deletes projection files from disk without removing description. -The commands ADD, DROP and CLEAR are lightweight in a sense that they only change metadata or remove files. +The commands `ADD`, `DROP` and `CLEAR` are lightweight in a sense that they only change metadata or remove files. Also, they are replicated, syncing projections metadata via ZooKeeper. diff --git a/docs/en/sql-reference/statements/alter/view.md b/docs/en/sql-reference/statements/alter/view.md new file mode 100644 index 00000000000..0fb1c4be0ff --- /dev/null +++ b/docs/en/sql-reference/statements/alter/view.md @@ -0,0 +1,44 @@ +--- +toc_priority: 50 +toc_title: VIEW +--- + +# ALTER TABLE … MODIFY QUERY Statement {#alter-modify-query} + +You can modify `SELECT` query that was specified when a [materialized view](../create/view.md#materialized) was created with the `ALTER TABLE … MODIFY QUERY` statement. Use it when the materialized view was created without the `TO [db.]name` clause. The `allow_experimental_alter_materialized_view_structure` setting must be enabled. + +If a materialized view uses the `TO [db.]name` construction, you must [DETACH](../detach.md) the view, run [ALTER TABLE](index.md) query for the target table, and then [ATTACH](../attach.md) the previously detached (`DETACH`) view. + +**Example** + +```sql +CREATE TABLE src_table (`a` UInt32) ENGINE = MergeTree ORDER BY a; +CREATE MATERIALIZED VIEW mv (`a` UInt32) ENGINE = MergeTree ORDER BY a AS SELECT a FROM src_table; +INSERT INTO src_table (a) VALUES (1), (2); +SELECT * FROM mv; +``` +```text +┌─a─┐ +│ 1 │ +│ 2 │ +└───┘ +``` +```sql +ALTER TABLE mv MODIFY QUERY SELECT a * 2 as a FROM src_table; +INSERT INTO src_table (a) VALUES (3), (4); +SELECT * FROM mv; +``` +```text +┌─a─┐ +│ 6 │ +│ 8 │ +└───┘ +┌─a─┐ +│ 1 │ +│ 2 │ +└───┘ +``` + +## ALTER LIVE VIEW Statement {#alter-live-view} + +`ALTER LIVE VIEW ... REFRESH` statement refreshes a [Live view](../create/view.md#live-view). See [Force Live View Refresh](../create/view.md#live-view-alter-refresh). diff --git a/docs/en/sql-reference/statements/create/function.md b/docs/en/sql-reference/statements/create/function.md new file mode 100644 index 00000000000..ddfcdfef521 --- /dev/null +++ b/docs/en/sql-reference/statements/create/function.md @@ -0,0 +1,59 @@ +--- +toc_priority: 38 +toc_title: FUNCTION +--- + +# CREATE FUNCTION {#create-function} + +Creates a user defined function from a lambda expression. The expression must consist of function parameters, constants, operators, or other function calls. + +**Syntax** + +```sql +CREATE FUNCTION name AS (parameter0, ...) -> expression +``` +A function can have an arbitrary number of parameters. + +There are a few restrictions: + +- The name of a function must be unique among user defined and system functions. +- Recursive functions are not allowed. +- All variables used by a function must be specified in its parameter list. + +If any restriction is violated then an exception is raised. + +**Example** + +Query: + +```sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +SELECT number, linear_equation(number, 2, 1) FROM numbers(3); +``` + +Result: + +``` text +┌─number─┬─plus(multiply(2, number), 1)─┐ +│ 0 │ 1 │ +│ 1 │ 3 │ +│ 2 │ 5 │ +└────────┴──────────────────────────────┘ +``` + +A [conditional function](../../../sql-reference/functions/conditional-functions.md) is called in a user defined function in the following query: + +```sql +CREATE FUNCTION parity_str AS (n) -> if(n % 2, 'odd', 'even'); +SELECT number, parity_str(number) FROM numbers(3); +``` + +Result: + +``` text +┌─number─┬─if(modulo(number, 2), 'odd', 'even')─┐ +│ 0 │ even │ +│ 1 │ odd │ +│ 2 │ even │ +└────────┴──────────────────────────────────────┘ +``` diff --git a/docs/en/sql-reference/statements/create/index.md b/docs/en/sql-reference/statements/create/index.md index 902a4348bac..3df62869e2b 100644 --- a/docs/en/sql-reference/statements/create/index.md +++ b/docs/en/sql-reference/statements/create/index.md @@ -12,10 +12,11 @@ Create queries make a new entity of one of the following kinds: - [TABLE](../../../sql-reference/statements/create/table.md) - [VIEW](../../../sql-reference/statements/create/view.md) - [DICTIONARY](../../../sql-reference/statements/create/dictionary.md) +- [FUNCTION](../../../sql-reference/statements/create/function.md) - [USER](../../../sql-reference/statements/create/user.md) - [ROLE](../../../sql-reference/statements/create/role.md) - [ROW POLICY](../../../sql-reference/statements/create/row-policy.md) - [QUOTA](../../../sql-reference/statements/create/quota.md) - [SETTINGS PROFILE](../../../sql-reference/statements/create/settings-profile.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/create/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/create/) diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index d09ff24efcd..5334532a54f 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -207,8 +207,6 @@ ALTER TABLE codec_example MODIFY COLUMN float_value CODEC(Default); Codecs can be combined in a pipeline, for example, `CODEC(Delta, Default)`. -To select the best codec combination for you project, pass benchmarks similar to described in the Altinity [New Encodings to Improve ClickHouse Efficiency](https://www.altinity.com/blog/2019/7/new-encodings-to-improve-clickhouse) article. One thing to note is that codec can't be applied for ALIAS column type. - !!! warning "Warning" You can’t decompress ClickHouse database files with external utilities like `lz4`. Instead, use the special [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor) utility. diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 9693f584761..b6a09e25f95 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -5,9 +5,9 @@ toc_title: VIEW # CREATE VIEW {#create-view} -Creates a new view. There are two types of views: normal and materialized. +Creates a new view. Views can be [normal](#normal), [materialized](#materialized) and [live](#live-view) (the latter is an experimental feature). -## Normal {#normal} +## Normal View {#normal} Syntax: @@ -35,7 +35,7 @@ This query is fully equivalent to using the subquery: SELECT a, b, c FROM (SELECT ...) ``` -## Materialized {#materialized} +## Materialized View {#materialized} ``` sql CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] [TO[db.]name] [ENGINE = engine] [POPULATE] AS SELECT ... @@ -49,6 +49,9 @@ When creating a materialized view with `TO [db].[table]`, you must not use `POPU A materialized view is implemented as follows: when inserting data to the table specified in `SELECT`, part of the inserted data is converted by this `SELECT` query, and the result is inserted in the view. +!!! important "Important" + Materialized views in ClickHouse use **column names** instead of column order during insertion into destination table. If some column names are not present in `SELECT`'s result ClickHouse will use a default value, even if column is not `Nullable`. A safe practice would be to add aliases for every column when using Materialized views. + !!! important "Important" Materialized views in ClickHouse are implemented more like insert triggers. If there’s some aggregation in the view query, it’s applied only to the batch of freshly inserted data. Any changes to existing data of source table (like update, delete, drop partition, etc.) does not change the materialized view. @@ -56,7 +59,7 @@ If you specify `POPULATE`, the existing table data is inserted in the view when A `SELECT` query can contain `DISTINCT`, `GROUP BY`, `ORDER BY`, `LIMIT`… Note that the corresponding conversions are performed independently on each block of inserted data. For example, if `GROUP BY` is set, data is aggregated during insertion, but only within a single packet of inserted data. The data won’t be further aggregated. The exception is when using an `ENGINE` that independently performs data aggregation, such as `SummingMergeTree`. -The execution of [ALTER](../../../sql-reference/statements/alter/index.md) queries on materialized views has limitations, so they might be inconvenient. If the materialized view uses the construction `TO [db.]name`, you can `DETACH` the view, run `ALTER` for the target table, and then `ATTACH` the previously detached (`DETACH`) view. +The execution of [ALTER](../../../sql-reference/statements/alter/view.md) queries on materialized views has limitations, so they might be inconvenient. If the materialized view uses the construction `TO [db.]name`, you can `DETACH` the view, run `ALTER` for the target table, and then `ATTACH` the previously detached (`DETACH`) view. Note that materialized view is influenced by [optimize_on_insert](../../../operations/settings/settings.md#optimize-on-insert) setting. The data is merged before the insertion into a view. @@ -64,7 +67,7 @@ Views look the same as normal tables. For example, they are listed in the result To delete a view, use [DROP VIEW](../../../sql-reference/statements/drop.md#drop-view). Although `DROP TABLE` works for VIEWs as well. -## Live View (Experimental) {#live-view} +## Live View [Experimental] {#live-view} !!! important "Important" This is an experimental feature that may change in backwards-incompatible ways in the future releases. @@ -90,7 +93,7 @@ Live views work similarly to how a query in a distributed table works. But inste See [WITH REFRESH](#live-view-with-refresh) to force periodic updates of a live view that in some cases can be used as a workaround. -### Monitoring Changes {#live-view-monitoring} +### Monitoring Live View Changes {#live-view-monitoring} You can monitor changes in the `LIVE VIEW` query result using [WATCH](../../../sql-reference/statements/watch.md) query. @@ -115,12 +118,11 @@ WATCH lv; │ 1 │ 1 │ └────────┴──────────┘ ┌─sum(x)─┬─_version─┐ -│ 2 │ 2 │ +│ 3 │ 2 │ └────────┴──────────┘ ┌─sum(x)─┬─_version─┐ │ 6 │ 3 │ └────────┴──────────┘ -... ``` ```sql @@ -151,7 +153,6 @@ WATCH lv EVENTS; ┌─version─┐ │ 3 │ └─────────┘ -... ``` You can execute [SELECT](../../../sql-reference/statements/select/index.md) query on a live view in the same way as for any regular view or a table. If the query result is cached it will return the result immediately without running the stored query on the underlying tables. @@ -160,7 +161,7 @@ You can execute [SELECT](../../../sql-reference/statements/select/index.md) quer SELECT * FROM [db.]live_view WHERE ... ``` -### Force Refresh {#live-view-alter-refresh} +### Force Live View Refresh {#live-view-alter-refresh} You can force live view refresh using the `ALTER LIVE VIEW [db.]table_name REFRESH` statement. @@ -232,7 +233,7 @@ WATCH lv Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table default.lv does not exist.. ``` -### Usage {#live-view-usage} +### Live View Usage {#live-view-usage} Most common uses of live view tables include: @@ -241,4 +242,5 @@ Most common uses of live view tables include: - Watching for table changes and triggering a follow-up select queries. - Watching metrics from system tables using periodic refresh. -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/create/view/) +**See Also** +- [ALTER LIVE VIEW](../alter/view.md#alter-live-view) diff --git a/docs/en/sql-reference/statements/drop.md b/docs/en/sql-reference/statements/drop.md index 90a2a46c7cf..552a7b5f1a9 100644 --- a/docs/en/sql-reference/statements/drop.md +++ b/docs/en/sql-reference/statements/drop.md @@ -97,4 +97,20 @@ Syntax: DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster] ``` -[Оriginal article](https://clickhouse.tech/docs/en/sql-reference/statements/drop/) +## DROP FUNCTION {#drop-function} + +Deletes a user defined function created by [CREATE FUNCTION](./create/function.md). +System functions can not be dropped. + +**Syntax** + +``` sql +DROP FUNCTION [IF EXISTS] function_name +``` + +**Example** + +``` sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +DROP FUNCTION linear_equation; +``` diff --git a/docs/en/sql-reference/statements/explain.md b/docs/en/sql-reference/statements/explain.md index 9afea708d16..2d129f1bc60 100644 --- a/docs/en/sql-reference/statements/explain.md +++ b/docs/en/sql-reference/statements/explain.md @@ -412,4 +412,4 @@ Result: └──────────┴───────┴───────┴──────┴───────┘ ``` -[Оriginal article](https://clickhouse.tech/docs/en/sql-reference/statements/explain/) +[Оriginal article](https://clickhouse.com/docs/en/sql-reference/statements/explain/) diff --git a/docs/en/sql-reference/statements/grant.md b/docs/en/sql-reference/statements/grant.md index 25dffc36954..f04952746a6 100644 --- a/docs/en/sql-reference/statements/grant.md +++ b/docs/en/sql-reference/statements/grant.md @@ -107,11 +107,13 @@ Hierarchy of privileges: - `CREATE TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` + - `CREATE FUNCTION` - [DROP](#grant-drop) - `DROP DATABASE` - `DROP TABLE` - `DROP VIEW` - `DROP DICTIONARY` + - `DROP FUNCTION` - [TRUNCATE](#grant-truncate) - [OPTIMIZE](#grant-optimize) - [SHOW](#grant-show) @@ -153,6 +155,8 @@ Hierarchy of privileges: - `SYSTEM RELOAD CONFIG` - `SYSTEM RELOAD DICTIONARY` - `SYSTEM RELOAD EMBEDDED DICTIONARIES` + - `SYSTEM RELOAD FUNCTION` + - `SYSTEM RELOAD FUNCTIONS` - `SYSTEM MERGES` - `SYSTEM TTL MERGES` - `SYSTEM FETCHES` diff --git a/docs/en/sql-reference/statements/optimize.md b/docs/en/sql-reference/statements/optimize.md index 864509cec94..4054f373cc1 100644 --- a/docs/en/sql-reference/statements/optimize.md +++ b/docs/en/sql-reference/statements/optimize.md @@ -18,13 +18,17 @@ OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [PARTITION partition | PARTITION I The `OPTMIZE` query is supported for [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md) family, the [MaterializedView](../../engines/table-engines/special/materializedview.md) and the [Buffer](../../engines/table-engines/special/buffer.md) engines. Other table engines aren’t supported. -When `OPTIMIZE` is used with the [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md) family of table engines, ClickHouse creates a task for merging and waits for execution on all nodes (if the `replication_alter_partitions_sync` setting is enabled). +When `OPTIMIZE` is used with the [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md) family of table engines, ClickHouse creates a task for merging and waits for execution on all replicas (if the [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) setting is set to `2`) or on current replica (if the [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) setting is set to `1`). - If `OPTIMIZE` does not perform a merge for any reason, it does not notify the client. To enable notifications, use the [optimize_throw_if_noop](../../operations/settings/settings.md#setting-optimize_throw_if_noop) setting. - If you specify a `PARTITION`, only the specified partition is optimized. [How to set partition expression](../../sql-reference/statements/alter/index.md#alter-how-to-specify-part-expr). - If you specify `FINAL`, optimization is performed even when all the data is already in one part. Also merge is forced even if concurrent merges are performed. - If you specify `DEDUPLICATE`, then completely identical rows (unless by-clause is specified) will be deduplicated (all columns are compared), it makes sense only for the MergeTree engine. +You can specify how long (in seconds) to wait for inactive replicas to execute `OPTIMIZE` queries by the [replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout) setting. + +!!! info "Note" + If the `replication_alter_partitions_sync` is set to `2` and some replicas are not active for more than the time, specified by the `replication_wait_for_inactive_replica_timeout` setting, then an exception `UNFINISHED` is thrown. ## BY expression {#by-expression} diff --git a/docs/en/sql-reference/statements/revoke.md b/docs/en/sql-reference/statements/revoke.md index 71a76546096..75005260c4a 100644 --- a/docs/en/sql-reference/statements/revoke.md +++ b/docs/en/sql-reference/statements/revoke.md @@ -45,4 +45,4 @@ GRANT SELECT ON accounts.staff TO mira; REVOKE SELECT(wage) ON accounts.staff FROM mira; ``` -{## [Original article](https://clickhouse.tech/docs/en/operations/settings/settings/) ##} +{## [Original article](https://clickhouse.com/docs/en/operations/settings/settings/) ##} diff --git a/docs/en/sql-reference/statements/select/all.md b/docs/en/sql-reference/statements/select/all.md index 891b82c4319..ba66f63b447 100644 --- a/docs/en/sql-reference/statements/select/all.md +++ b/docs/en/sql-reference/statements/select/all.md @@ -18,4 +18,4 @@ equals to SELECT sum(number) FROM numbers(10); ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/select/all) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/select/all) diff --git a/docs/en/sql-reference/statements/select/index.md b/docs/en/sql-reference/statements/select/index.md index 4e96bae8493..b3cc7555d91 100644 --- a/docs/en/sql-reference/statements/select/index.md +++ b/docs/en/sql-reference/statements/select/index.md @@ -282,4 +282,4 @@ Other ways to make settings see [here](../../../operations/settings/index.md). SELECT * FROM some_table SETTINGS optimize_read_in_order=1, cast_keep_nullable=1; ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/select/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/select/) diff --git a/docs/en/sql-reference/statements/select/join.md b/docs/en/sql-reference/statements/select/join.md index 0002e6db313..aa61348d2a0 100644 --- a/docs/en/sql-reference/statements/select/join.md +++ b/docs/en/sql-reference/statements/select/join.md @@ -6,7 +6,7 @@ toc_title: JOIN Join produces a new table by combining columns from one or multiple tables by using values common to each. It is a common operation in databases with SQL support, which corresponds to [relational algebra](https://en.wikipedia.org/wiki/Relational_algebra#Joins_and_join-like_operators) join. The special case of one table join is often referred to as “self-join”. -Syntax: +**Syntax** ``` sql SELECT @@ -36,9 +36,12 @@ Additional join types available in ClickHouse: - `LEFT ANY JOIN`, `RIGHT ANY JOIN` and `INNER ANY JOIN`, partially (for opposite side of `LEFT` and `RIGHT`) or completely (for `INNER` and `FULL`) disables the cartesian product for standard `JOIN` types. - `ASOF JOIN` and `LEFT ASOF JOIN`, joining sequences with a non-exact match. `ASOF JOIN` usage is described below. +!!! note "Note" + When [join_algorithm](../../../operations/settings/settings.md#settings-join_algorithm) is set to `partial_merge`, `RIGHT JOIN` and `FULL JOIN` are supported only with `ALL` strictness (`SEMI`, `ANTI`, `ANY`, and `ASOF` are not supported). + ## Settings {#join-settings} -The default join type can be overriden using [join_default_strictness](../../../operations/settings/settings.md#settings-join_default_strictness) setting. +The default join type can be overridden using [join_default_strictness](../../../operations/settings/settings.md#settings-join_default_strictness) setting. The behavior of ClickHouse server for `ANY JOIN` operations depends on the [any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys) setting. @@ -52,6 +55,61 @@ The behavior of ClickHouse server for `ANY JOIN` operations depends on the [any_ - [join_on_disk_max_files_to_merge](../../../operations/settings/settings.md#join_on_disk_max_files_to_merge) - [any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys) +## ON Section Conditions {on-section-conditions} + +An `ON` section can contain several conditions combined using the `AND` operator. Conditions specifying join keys must refer both left and right tables and must use the equality operator. Other conditions may use other logical operators but they must refer either the left or the right table of a query. +Rows are joined if the whole complex condition is met. If the conditions are not met, still rows may be included in the result depending on the `JOIN` type. Note that if the same conditions are placed in a `WHERE` section and they are not met, then rows are always filtered out from the result. + +!!! note "Note" + The `OR` operator inside an `ON` section is not supported yet. + +!!! note "Note" + If a condition refers columns from different tables, then only the equality operator (`=`) is supported so far. + +**Example** + +Consider `table_1` and `table_2`: + +``` +┌─Id─┬─name─┐ ┌─Id─┬─text───────────┬─scores─┐ +│ 1 │ A │ │ 1 │ Text A │ 10 │ +│ 2 │ B │ │ 1 │ Another text A │ 12 │ +│ 3 │ C │ │ 2 │ Text B │ 15 │ +└────┴──────┘ └────┴────────────────┴────────┘ +``` + +Query with one join key condition and an additional condition for `table_2`: + +``` sql +SELECT name, text FROM table_1 LEFT OUTER JOIN table_2 + ON table_1.Id = table_2.Id AND startsWith(table_2.text, 'Text'); +``` + +Note that the result contains the row with the name `C` and the empty text column. It is included into the result because an `OUTER` type of a join is used. + +``` +┌─name─┬─text───┐ +│ A │ Text A │ +│ B │ Text B │ +│ C │ │ +└──────┴────────┘ +``` + +Query with `INNER` type of a join and multiple conditions: + +``` sql +SELECT name, text, scores FROM table_1 INNER JOIN table_2 + ON table_1.Id = table_2.Id AND table_2.scores > 10 AND startsWith(table_2.text, 'Text'); +``` + +Result: + +``` +┌─name─┬─text───┬─scores─┐ +│ B │ Text B │ 15 │ +└──────┴────────┴────────┘ +``` + ## ASOF JOIN Usage {#asof-join-usage} `ASOF JOIN` is useful when you need to join records that have no exact match. @@ -59,7 +117,7 @@ The behavior of ClickHouse server for `ANY JOIN` operations depends on the [any_ Algorithm requires the special column in tables. This column: - Must contain an ordered sequence. -- Can be one of the following types: [Int*, UInt*](../../../sql-reference/data-types/int-uint.md), [Float\*](../../../sql-reference/data-types/float.md), [Date](../../../sql-reference/data-types/date.md), [DateTime](../../../sql-reference/data-types/datetime.md), [Decimal\*](../../../sql-reference/data-types/decimal.md). +- Can be one of the following types: [Int, UInt](../../../sql-reference/data-types/int-uint.md), [Float](../../../sql-reference/data-types/float.md), [Date](../../../sql-reference/data-types/date.md), [DateTime](../../../sql-reference/data-types/datetime.md), [Decimal](../../../sql-reference/data-types/decimal.md). - Can’t be the only column in the `JOIN` clause. Syntax `ASOF JOIN ... ON`: @@ -84,7 +142,7 @@ ASOF JOIN table_2 USING (equi_column1, ... equi_columnN, asof_column) ``` -`ASOF JOIN` uses `equi_columnX` for joining on equality and `asof_column` for joining on the closest match with the `table_1.asof_column >= table_2.asof_column` condition. The `asof_column` column always the last one in the `USING` clause. +`ASOF JOIN` uses `equi_columnX` for joining on equality and `asof_column` for joining on the closest match with the `table_1.asof_column >= table_2.asof_column` condition. The `asof_column` column is always the last one in the `USING` clause. For example, consider the following tables: diff --git a/docs/en/sql-reference/statements/select/order-by.md b/docs/en/sql-reference/statements/select/order-by.md index 156f68935b5..030f04d5e83 100644 --- a/docs/en/sql-reference/statements/select/order-by.md +++ b/docs/en/sql-reference/statements/select/order-by.md @@ -400,4 +400,4 @@ Result: └────────────┴────────────┴──────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/select/order-by/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/select/order-by/) diff --git a/docs/en/sql-reference/statements/select/union.md b/docs/en/sql-reference/statements/select/union.md index 6cedfb89787..6dfe554edf0 100644 --- a/docs/en/sql-reference/statements/select/union.md +++ b/docs/en/sql-reference/statements/select/union.md @@ -84,4 +84,4 @@ Queries that are parts of `UNION/UNION ALL/UNION DISTINCT` can be run simultaneo - [union_default_mode](../../../operations/settings/settings.md#union-default-mode) setting. -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/select/union/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/select/union/) diff --git a/docs/en/sql-reference/statements/select/where.md b/docs/en/sql-reference/statements/select/where.md index f1532115e55..69505a51db4 100644 --- a/docs/en/sql-reference/statements/select/where.md +++ b/docs/en/sql-reference/statements/select/where.md @@ -6,7 +6,7 @@ toc_title: WHERE `WHERE` clause allows to filter the data that is coming from [FROM](../../../sql-reference/statements/select/from.md) clause of `SELECT`. -If there is a `WHERE` clause, it must contain an expression with the `UInt8` type. This is usually an expression with comparison and logical operators. Rows where this expression evaluates to 0 are expluded from further transformations or result. +If there is a `WHERE` clause, it must contain an expression with the `UInt8` type. This is usually an expression with comparison and logical operators. Rows where this expression evaluates to 0 are excluded from further transformations or result. `WHERE` expression is evaluated on the ability to use indexes and partition pruning, if the underlying table engine supports that. diff --git a/docs/en/sql-reference/statements/select/with.md b/docs/en/sql-reference/statements/select/with.md index 2dca9650340..d6c8da261cb 100644 --- a/docs/en/sql-reference/statements/select/with.md +++ b/docs/en/sql-reference/statements/select/with.md @@ -67,4 +67,4 @@ WITH test1 AS (SELECT i + 1, j + 1 FROM test1) SELECT * FROM test1; ``` -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/select/with/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/select/with/) diff --git a/docs/en/sql-reference/statements/show.md b/docs/en/sql-reference/statements/show.md index b5df38642ad..e00d58dfed4 100644 --- a/docs/en/sql-reference/statements/show.md +++ b/docs/en/sql-reference/statements/show.md @@ -8,7 +8,7 @@ toc_title: SHOW ## SHOW CREATE TABLE {#show-create-table} ``` sql -SHOW CREATE [TEMPORARY] [TABLE|DICTIONARY] [db.]table [INTO OUTFILE filename] [FORMAT format] +SHOW CREATE [TEMPORARY] [TABLE|DICTIONARY|VIEW] [db.]table|view [INTO OUTFILE filename] [FORMAT format] ``` Returns a single `String`-type ‘statement’ column, which contains a single value – the `CREATE` query used for creating the specified object. @@ -91,7 +91,7 @@ Result: ### See Also {#see-also} -- [CREATE DATABASE](https://clickhouse.tech/docs/en/sql-reference/statements/create/database/#query-language-create-database) +- [CREATE DATABASE](https://clickhouse.com/docs/en/sql-reference/statements/create/database/#query-language-create-database) ## SHOW PROCESSLIST {#show-processlist} @@ -190,8 +190,8 @@ Result: ### See Also {#see-also} -- [Create Tables](https://clickhouse.tech/docs/en/getting-started/tutorial/#create-tables) -- [SHOW CREATE TABLE](https://clickhouse.tech/docs/en/sql-reference/statements/show/#show-create-table) +- [Create Tables](https://clickhouse.com/docs/en/getting-started/tutorial/#create-tables) +- [SHOW CREATE TABLE](https://clickhouse.com/docs/en/sql-reference/statements/show/#show-create-table) ## SHOW DICTIONARIES {#show-dictionaries} @@ -493,4 +493,4 @@ Result: - [system.settings](../../operations/system-tables/settings.md) table -[Original article](https://clickhouse.tech/docs/en/sql-reference/statements/show/) +[Original article](https://clickhouse.com/docs/en/sql-reference/statements/show/) diff --git a/docs/en/sql-reference/statements/system.md b/docs/en/sql-reference/statements/system.md index cf2a99a4c5f..2009d23ec54 100644 --- a/docs/en/sql-reference/statements/system.md +++ b/docs/en/sql-reference/statements/system.md @@ -12,6 +12,8 @@ The list of available `SYSTEM` statements: - [RELOAD DICTIONARY](#query_language-system-reload-dictionary) - [RELOAD MODELS](#query_language-system-reload-models) - [RELOAD MODEL](#query_language-system-reload-model) +- [RELOAD FUNCTIONS](#query_language-system-reload-functions) +- [RELOAD FUNCTION](#query_language-system-reload-functions) - [DROP DNS CACHE](#query_language-system-drop-dns-cache) - [DROP MARK CACHE](#query_language-system-drop-mark-cache) - [DROP UNCOMPRESSED CACHE](#query_language-system-drop-uncompressed-cache) @@ -83,6 +85,17 @@ Completely reloads a CatBoost model `model_name` if the configuration was update SYSTEM RELOAD MODEL ``` +## RELOAD FUNCTIONS {#query_language-system-reload-functions} + +Reloads all registered [executable user defined functions](../functions/index.md#executable-user-defined-functions) or one of them from a configuration file. + +**Syntax** + +```sql +RELOAD FUNCTIONS +RELOAD FUNCTION function_name +``` + ## DROP DNS CACHE {#query_language-system-drop-dns-cache} Resets ClickHouse’s internal DNS cache. Sometimes (for old ClickHouse versions) it is necessary to use this command when changing the infrastructure (changing the IP address of another ClickHouse server or the server used by dictionaries). diff --git a/docs/en/sql-reference/statements/truncate.md b/docs/en/sql-reference/statements/truncate.md index f302a8605e2..b5354196fa4 100644 --- a/docs/en/sql-reference/statements/truncate.md +++ b/docs/en/sql-reference/statements/truncate.md @@ -12,3 +12,10 @@ TRUNCATE TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster] Removes all data from a table. When the clause `IF EXISTS` is omitted, the query returns an error if the table does not exist. The `TRUNCATE` query is not supported for [View](../../engines/table-engines/special/view.md), [File](../../engines/table-engines/special/file.md), [URL](../../engines/table-engines/special/url.md), [Buffer](../../engines/table-engines/special/buffer.md) and [Null](../../engines/table-engines/special/null.md) table engines. + +You can use the [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) setting to set up waiting for actions to be executed on replicas. + +You can specify how long (in seconds) to wait for inactive replicas to execute `TRUNCATE` queries with the [replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout) setting. + +!!! info "Note" + If the `replication_alter_partitions_sync` is set to `2` and some replicas are not active for more than the time, specified by the `replication_wait_for_inactive_replica_timeout` setting, then an exception `UNFINISHED` is thrown. diff --git a/docs/en/sql-reference/syntax.md b/docs/en/sql-reference/syntax.md index 573e35d2f71..207b2b82cd2 100644 --- a/docs/en/sql-reference/syntax.md +++ b/docs/en/sql-reference/syntax.md @@ -104,6 +104,28 @@ There are many nuances to processing `NULL`. For example, if at least one of the In queries, you can check `NULL` using the [IS NULL](../sql-reference/operators/index.md#operator-is-null) and [IS NOT NULL](../sql-reference/operators/index.md) operators and the related functions `isNull` and `isNotNull`. +### Heredoc {#heredeoc} + +A [heredoc](https://en.wikipedia.org/wiki/Here_document) is a way to define a string (often multiline), while maintaining the original formatting. A heredoc is defined as a custom string literal, placed between two `$` symbols, for example `$heredoc$`. A value between two heredocs is processed "as-is". + +You can use a heredoc to embed snippets of SQL, HTML, or XML code, etc. + +**Example** + +Query: + +```sql +SELECT $smth$SHOW CREATE VIEW my_view$smth$; +``` + +Result: + +```text +┌─'SHOW CREATE VIEW my_view'─┐ +│ SHOW CREATE VIEW my_view │ +└────────────────────────────┘ +``` + ## Functions {#functions} Function calls are written like an identifier with a list of arguments (possibly empty) in round brackets. In contrast to standard SQL, the brackets are required, even for an empty argument list. Example: `now()`. @@ -183,4 +205,4 @@ An expression is a function, identifier, literal, application of an operator, ex A list of expressions is one or more expressions separated by commas. Functions and operators, in turn, can have expressions as arguments. -[Original article](https://clickhouse.tech/docs/en/sql_reference/syntax/) +[Original article](https://clickhouse.com/docs/en/sql_reference/syntax/) diff --git a/docs/en/sql-reference/table-functions/file.md b/docs/en/sql-reference/table-functions/file.md index e1459b5e254..f7c2a9e6d5b 100644 --- a/docs/en/sql-reference/table-functions/file.md +++ b/docs/en/sql-reference/table-functions/file.md @@ -126,4 +126,4 @@ SELECT count(*) FROM file('big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name String, - [Virtual columns](../../engines/table-engines/index.md#table_engines-virtual_columns) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/file/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/file/) diff --git a/docs/en/sql-reference/table-functions/index.md b/docs/en/sql-reference/table-functions/index.md index d65a18ab985..c32ae0c2a86 100644 --- a/docs/en/sql-reference/table-functions/index.md +++ b/docs/en/sql-reference/table-functions/index.md @@ -14,7 +14,7 @@ You can use table functions in: The method for creating a temporary table that is available only in the current query. The table is deleted when the query finishes. -- [CREATE TABLE AS \](../../sql-reference/statements/create/table.md) query. +- [CREATE TABLE AS table_function()](../../sql-reference/statements/create/table.md) query. It's one of the methods of creating a table. @@ -34,5 +34,6 @@ You can use table functions in: | [odbc](../../sql-reference/table-functions/odbc.md) | Creates a [ODBC](../../engines/table-engines/integrations/odbc.md)-engine table. | | [hdfs](../../sql-reference/table-functions/hdfs.md) | Creates a [HDFS](../../engines/table-engines/integrations/hdfs.md)-engine table. | | [s3](../../sql-reference/table-functions/s3.md) | Creates a [S3](../../engines/table-engines/integrations/s3.md)-engine table. | +| [sqlite](../../sql-reference/table-functions/sqlite.md) | Creates a [sqlite](../../engines/table-engines/integrations/sqlite.md)-engine table. | -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/) diff --git a/docs/en/sql-reference/table-functions/jdbc.md b/docs/en/sql-reference/table-functions/jdbc.md index 4943e0291df..9fe1333fc94 100644 --- a/docs/en/sql-reference/table-functions/jdbc.md +++ b/docs/en/sql-reference/table-functions/jdbc.md @@ -35,4 +35,4 @@ FROM jdbc('mysql-dev?datasource_column', 'show databases') a INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name ``` -[Original article](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[Original article](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/en/sql-reference/table-functions/mysql.md b/docs/en/sql-reference/table-functions/mysql.md index 627b81a3ddb..b45ab86f60f 100644 --- a/docs/en/sql-reference/table-functions/mysql.md +++ b/docs/en/sql-reference/table-functions/mysql.md @@ -110,4 +110,4 @@ SELECT * FROM mysql('localhost:3306', 'test', 'test', 'bayonet', '123'); - [The ‘MySQL’ table engine](../../engines/table-engines/integrations/mysql.md) - [Using MySQL as a source of external dictionary](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-mysql) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table_functions/mysql/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table_functions/mysql/) diff --git a/docs/en/sql-reference/table-functions/null.md b/docs/en/sql-reference/table-functions/null.md index 273091f8fd1..4a8d221d620 100644 --- a/docs/en/sql-reference/table-functions/null.md +++ b/docs/en/sql-reference/table-functions/null.md @@ -40,4 +40,4 @@ See also: - [Null table engine](../../engines/table-engines/special/null.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/null/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/null/) diff --git a/docs/en/sql-reference/table-functions/postgresql.md b/docs/en/sql-reference/table-functions/postgresql.md index 85c9366daf9..b2bdc2495e5 100644 --- a/docs/en/sql-reference/table-functions/postgresql.md +++ b/docs/en/sql-reference/table-functions/postgresql.md @@ -129,4 +129,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [The PostgreSQL table engine](../../engines/table-engines/integrations/postgresql.md) - [Using PostgreSQL as a source of external dictionary](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-postgresql) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/postgresql/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/postgresql/) diff --git a/docs/en/sql-reference/table-functions/s3.md b/docs/en/sql-reference/table-functions/s3.md index d84edb3f46e..599213561f2 100644 --- a/docs/en/sql-reference/table-functions/s3.md +++ b/docs/en/sql-reference/table-functions/s3.md @@ -3,7 +3,7 @@ toc_priority: 45 toc_title: s3 --- -# S3 Table Function {#s3-table-function} +# s3 Table Function {#s3-table-function} Provides table-like interface to select/insert files in [Amazon S3](https://aws.amazon.com/s3/). This table function is similar to [hdfs](../../sql-reference/table-functions/hdfs.md), but provides S3-specific features. @@ -125,8 +125,32 @@ INSERT INTO FUNCTION s3('https://storage.yandexcloud.net/my-test-bucket-768/test SELECT name, value FROM existing_table; ``` +## Partitioned Write {#partitioned-write} + +If you specify `PARTITION BY` expression when inserting data into `S3` table, a separate file is created for each partition value. Splitting the data into separate files helps to improve reading operations efficiency. + +**Examples** + +1. Using partition ID in a key creates separate files: + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket/file_{_partition_id}.csv', 'CSV', 'a String, b UInt32, c UInt32') + PARTITION BY a VALUES ('x', 2, 3), ('x', 4, 5), ('y', 11, 12), ('y', 13, 14), ('z', 21, 22), ('z', 23, 24); +``` +As a result, the data is written into three files: `file_x.csv`, `file_y.csv`, and `file_z.csv`. + +2. Using partition ID in a bucket name creates files in different buckets: + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket_{_partition_id}/file.csv', 'CSV', 'a UInt32, b UInt32, c UInt32') + PARTITION BY a VALUES (1, 2, 3), (1, 4, 5), (10, 11, 12), (10, 13, 14), (20, 21, 22), (20, 23, 24); +``` +As a result, the data is written into three files in different buckets: `my_bucket_1/file.csv`, `my_bucket_10/file.csv`, and `my_bucket_20/file.csv`. + **See Also** - [S3 engine](../../engines/table-engines/integrations/s3.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/s3/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/s3/) diff --git a/docs/en/sql-reference/table-functions/sqlite.md b/docs/en/sql-reference/table-functions/sqlite.md new file mode 100644 index 00000000000..be7bd92d7e7 --- /dev/null +++ b/docs/en/sql-reference/table-functions/sqlite.md @@ -0,0 +1,45 @@ +--- +toc_priority: 55 +toc_title: sqlite +--- + +## sqlite {#sqlite} + +Allows to perform queries on a data stored in an [SQLite](../../engines/database-engines/sqlite.md) database. + +**Syntax** + +``` sql + sqlite('db_path', 'table_name') +``` + +**Arguments** + +- `db_path` — Path to a file with an SQLite database. [String](../../sql-reference/data-types/string.md). +- `table_name` — Name of a table in the SQLite database. [String](../../sql-reference/data-types/string.md). + +**Returned value** + +- A table object with the same columns as in the original `SQLite` table. + +**Example** + +Query: + +``` sql +SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2; +``` + +Result: + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` + +**See Also** + +- [SQLite](../../engines/table-engines/integrations/sqlite.md) table engine \ No newline at end of file diff --git a/docs/en/sql-reference/table-functions/view.md b/docs/en/sql-reference/table-functions/view.md index 18323ec4e92..f78120c370e 100644 --- a/docs/en/sql-reference/table-functions/view.md +++ b/docs/en/sql-reference/table-functions/view.md @@ -5,7 +5,7 @@ toc_title: view ## view {#view} -Turns a subquery into a table. The function implements views (see [CREATE VIEW](https://clickhouse.tech/docs/en/sql-reference/statements/create/view/#create-view)). The resulting table does not 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. +Turns a subquery into a table. The function implements views (see [CREATE VIEW](https://clickhouse.com/docs/en/sql-reference/statements/create/view/#create-view)). The resulting table does not 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. **Syntax** @@ -51,7 +51,7 @@ Result: └──────────┘ ``` -You can use the `view` function as a parameter of the [remote](https://clickhouse.tech/docs/en/sql-reference/table-functions/remote/#remote-remotesecure) and [cluster](https://clickhouse.tech/docs/en/sql-reference/table-functions/cluster/#cluster-clusterallreplicas) table functions: +You can use the `view` function as a parameter of the [remote](https://clickhouse.com/docs/en/sql-reference/table-functions/remote/#remote-remotesecure) and [cluster](https://clickhouse.com/docs/en/sql-reference/table-functions/cluster/#cluster-clusterallreplicas) table functions: ``` sql SELECT * FROM remote(`127.0.0.1`, view(SELECT a, b, c FROM table_name)); @@ -63,6 +63,6 @@ SELECT * FROM cluster(`cluster_name`, view(SELECT a, b, c FROM table_name)); **See Also** -- [View Table Engine](https://clickhouse.tech/docs/en/engines/table-engines/special/view/) +- [View Table Engine](https://clickhouse.com/docs/en/engines/table-engines/special/view/) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/view/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/view/) diff --git a/docs/en/whats-new/changelog/2017.md b/docs/en/whats-new/changelog/2017.md index 9ceca2b6c4a..af82c69386a 100644 --- a/docs/en/whats-new/changelog/2017.md +++ b/docs/en/whats-new/changelog/2017.md @@ -24,7 +24,7 @@ This release contains bug fixes for the previous release 1.1.54310: #### New Features: {#new-features} - Custom partitioning key for the MergeTree family of table engines. -- [Kafka](https://clickhouse.tech/docs/en/operations/table_engines/kafka/) table engine. +- [Kafka](https://clickhouse.com/docs/en/operations/table_engines/kafka/) table engine. - Added support for loading [CatBoost](https://catboost.yandex/) models and applying them to data stored in ClickHouse. - Added support for time zones with non-integer offsets from UTC. - Added support for arithmetic operations with time intervals. diff --git a/docs/en/whats-new/roadmap.md b/docs/en/whats-new/roadmap.md index 4abc36b5136..8872c42818f 100644 --- a/docs/en/whats-new/roadmap.md +++ b/docs/en/whats-new/roadmap.md @@ -7,4 +7,4 @@ toc_title: Roadmap The roadmap for the year 2021 is published for open discussion [here](https://github.com/ClickHouse/ClickHouse/issues/17623). -{## [Original article](https://clickhouse.tech/docs/en/roadmap/) ##} +{## [Original article](https://clickhouse.com/docs/en/roadmap/) ##} diff --git a/docs/en/whats-new/security-changelog.md b/docs/en/whats-new/security-changelog.md index 97cad9965fd..bcfeaa06e24 100644 --- a/docs/en/whats-new/security-changelog.md +++ b/docs/en/whats-new/security-changelog.md @@ -81,4 +81,4 @@ Incorrect configuration in deb package could lead to the unauthorized use of the Credits: the UK’s National Cyber Security Centre (NCSC) -{## [Original article](https://clickhouse.tech/docs/en/security_changelog/) ##} +{## [Original article](https://clickhouse.com/docs/en/security_changelog/) ##} diff --git a/docs/ja/commercial/cloud.md b/docs/ja/commercial/cloud.md index 62fc75ecbda..312b8aed6ea 100644 --- a/docs/ja/commercial/cloud.md +++ b/docs/ja/commercial/cloud.md @@ -5,31 +5,7 @@ toc_priority: 1 toc_title: "\u30AF\u30E9\u30A6\u30C9" --- -# ClickHouseの雲のサービス提供者 {#clickhouse-cloud-service-providers} +# ClickHouse Cloud Service {#clickhouse-cloud-service} -!!! info "情報" - Managed ClickHouse serviceを使用してパブリッククラウドを起動した場合は、以下をお気軽にご利用ください [プル要求を開く](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/cloud.md) それを次のリストに追加します。 - -## Yandexクラウド {#yandex-cloud} - -[ClickHouseのためのYandexの管理サービス](https://cloud.yandex.com/services/managed-clickhouse?utm_source=referrals&utm_medium=clickhouseofficialsite&utm_campaign=link3) 次の主な機能を提供します: - -- 完全に管理された飼育係サービス [クリックハウス複製](../engines/table-engines/mergetree-family/replication.md) -- 複数の記憶域タイプの選択肢 -- 異なる可用性ゾーンのレプリカ -- 暗号化と分離 -- 自動メンテナンス - -## Alibaba Cloud {#alibaba-cloud} - -[ClickHouseのためのAlibaba Cloudの管理サービス](https://www.alibabacloud.com/product/clickhouse) 次の主な機能を提供します: - -- Alibaba Cloud Apsara分散システムをベースにした信頼性の高いクラウドディスクストレージエンジン -- 手動でのデータ移行を必要とせずに、オン・デマンドで容量を拡張 -- シングル・ノード、シングル・レプリカ、マルチ・ノード、マルチ・レプリカ・アーキテクチャをサポートし、ホット・データとコールド・データの階層化をサポート -- アクセスホワイトリスト、OneKey Recovery、マルチレイヤーネットワークセキュリティ保護、クラウドディスク暗号化をサポート -- クラウドログシステム、データベース、およびデータアプリケーションツールとのシームレスな統合 -- 組み込み型の監視およびデータベース管理プラットフォーム -- プロフェッショナルデータベースエキスパートによるテクニカル・サポートとサービス - -{## [元の記事](https://clickhouse.tech/docs/en/commercial/cloud/) ##} +!!! info "Info" + Detailed public description for ClickHouse cloud services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/ja/commercial/index.md b/docs/ja/commercial/index.md index 75e13112d9e..75bbe782750 100644 --- a/docs/ja/commercial/index.md +++ b/docs/ja/commercial/index.md @@ -6,4 +6,9 @@ toc_priority: 70 toc_title: "\u5546\u696D" --- +# ClickHouse Commercial Services {#clickhouse-commercial-services} +Service categories: + +- [Cloud](../commercial/cloud.md) +- [Support](../commercial/support.md) diff --git a/docs/ja/development/adding_test_queries.md b/docs/ja/development/adding_test_queries.md new file mode 120000 index 00000000000..def9c4077be --- /dev/null +++ b/docs/ja/development/adding_test_queries.md @@ -0,0 +1 @@ +../../en/development/adding_test_queries.md \ No newline at end of file diff --git a/docs/ja/development/architecture.md b/docs/ja/development/architecture.md index 8dc1d471007..7e5460bb9cf 100644 --- a/docs/ja/development/architecture.md +++ b/docs/ja/development/architecture.md @@ -200,4 +200,4 @@ ClickHouseでのレプリケーションは、テーブルごとに構成でき !!! note "注" ClickHouseクラスターは独立したシャードで構成され、各シャードはレプリカで構成されます。 クラスターは **弾性ではない** したがって、新しいシャードを追加した後、データはシャード間で自動的に再調整されません。 代わりに、クラスタ負荷は不均一に調整されることになっています。 この実装はより多くの制御を提供し、数十のノードなどの比較的小さなクラスタでもokです。 しかし、運用環境で使用している数百のノードを持つクラスターでは、このアプローチは重大な欠点になります。 を実行すべきである"と述べていテーブルエンジンで広がる、クラスターを動的に再現れる可能性がある地域分割のバランスとクラスターの動します。 -{## [元の記事](https://clickhouse.tech/docs/en/development/architecture/) ##} +{## [元の記事](https://clickhouse.com/docs/en/development/architecture/) ##} diff --git a/docs/ja/development/browse-code.md b/docs/ja/development/browse-code.md index 45eba084f4a..6539014eaf0 100644 --- a/docs/ja/development/browse-code.md +++ b/docs/ja/development/browse-code.md @@ -7,7 +7,7 @@ toc_title: "\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u306E\u53C2\u7167" # ClickHouseのソースコードを参照 {#browse-clickhouse-source-code} -以下を使用できます **Woboq** オンラインのコードブラウザをご利用 [ここに](https://clickhouse.tech/codebrowser/html_report/ClickHouse/src/index.html). このコードナビゲーションや意味のハイライト表示、検索インデックス. コードのスナップショットは随時更新中です。 +以下を使用できます **Woboq** オンラインのコードブラウザをご利用 [ここに](https://clickhouse.com/codebrowser/html_report/ClickHouse/src/index.html). このコードナビゲーションや意味のハイライト表示、検索インデックス. コードのスナップショットは随時更新中です。 また、ソースを参照することもできます [GitHub](https://github.com/ClickHouse/ClickHouse) いつものように diff --git a/docs/ja/development/build-cross-arm.md b/docs/ja/development/build-cross-arm.md index a5fb0595d08..06df5f1936e 100644 --- a/docs/ja/development/build-cross-arm.md +++ b/docs/ja/development/build-cross-arm.md @@ -10,7 +10,7 @@ toc_title: "Aarch64\u7528\u306ELinux\u4E0A\u3067ClickHouse\u3092\u69CB\u7BC9\u30 これは、Linuxマシンを使用してビルドする場合のためのものです `clickhouse` AARCH64CPUアーキテクチャを持つ別のLinuxマシン上で実行されるバイナリ。 この目的のために継続的インテグレーションをチェックを実行Linuxサーバー -AARCH64のクロスビルドは [ビルド命令](build.md) 先について来い +AARCH64のクロスビルドは [ビルド命令](../development/build.md) 先について来い # Clang-8をインストール {#install-clang-8} diff --git a/docs/ja/development/build-cross-osx.md b/docs/ja/development/build-cross-osx.md index 7444a384e05..9ca1070cf27 100644 --- a/docs/ja/development/build-cross-osx.md +++ b/docs/ja/development/build-cross-osx.md @@ -8,9 +8,9 @@ toc_title: "Mac OS X\u7528\u306ELinux\u4E0A\u3067ClickHouse\u3092\u69CB\u7BC9\u3 # Mac OS X用のLinux上でClickHouseを構築する方法 {#how-to-build-clickhouse-on-linux-for-mac-os-x} -これは、Linuxマシンを使用してビルドする場合のためのものです `clickhouse` これは、Linuxサーバー上で実行される継続的な統合チェックを目的としています。 Mac OS X上でClickHouseを直接ビルドする場合は、次の手順に進みます [別の命令](build-osx.md). +これは、Linuxマシンを使用してビルドする場合のためのものです `clickhouse` これは、Linuxサーバー上で実行される継続的な統合チェックを目的としています。 Mac OS X上でClickHouseを直接ビルドする場合は、次の手順に進みます [別の命令](../development/build-osx.md). -Mac OS X用のクロスビルドは [ビルド命令](build.md) 先について来い +Mac OS X用のクロスビルドは [ビルド命令](../development/build.md) 先について来い # Clang-8をインストール {#install-clang-8} diff --git a/docs/ja/development/build-osx.md b/docs/ja/development/build-osx.md index 5d0af7d8f43..16557951b02 100644 --- a/docs/ja/development/build-osx.md +++ b/docs/ja/development/build-osx.md @@ -90,4 +90,4 @@ $ sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist チェックの場合は、利用できる `ulimit -n` コマンド -[元の記事](https://clickhouse.tech/docs/en/development/build_osx/) +[元の記事](https://clickhouse.com/docs/en/development/build_osx/) diff --git a/docs/ja/development/build.md b/docs/ja/development/build.md index 191fa665ccd..807b02714b4 100644 --- a/docs/ja/development/build.md +++ b/docs/ja/development/build.md @@ -127,4 +127,4 @@ $ cd ClickHouse $ ./release ``` -[元の記事](https://clickhouse.tech/docs/en/development/build/) +[元の記事](https://clickhouse.com/docs/en/development/build/) diff --git a/docs/ja/development/continuous-integration.md b/docs/ja/development/continuous-integration.md new file mode 120000 index 00000000000..f68058a436e --- /dev/null +++ b/docs/ja/development/continuous-integration.md @@ -0,0 +1 @@ +../../en/development/continuous-integration.md \ No newline at end of file diff --git a/docs/ja/development/developer-instruction.md b/docs/ja/development/developer-instruction.md index d7e5217b3b6..3eafbf0481d 100644 --- a/docs/ja/development/developer-instruction.md +++ b/docs/ja/development/developer-instruction.md @@ -236,11 +236,11 @@ KDevelopとQTCreatorは、ClickHouseを開発するためのIDEの他の優れ # コードの作成 {#writing-code} -の説明ClickHouse建築で、できるだけ早く送ってくださhttps://clickhouse.tech/docs/en/開発/アーキテクチャ/ +の説明ClickHouse建築で、できるだけ早く送ってくださhttps://clickhouse.com/docs/en/開発/アーキテクチャ/ -コードのスタイルガイド:https://clickhouse.tech/docs/en/開発/スタイル/ +コードのスタイルガイド:https://clickhouse.com/docs/en/開発/スタイル/ -筆記試験:https://clickhouse.tech/docs/en/development/tests/ +筆記試験:https://clickhouse.com/docs/en/development/tests/ タスクのリスト:https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+task%22 @@ -250,8 +250,8 @@ KDevelopとQTCreatorは、ClickHouseを開発するためのIDEの他の優れ sudo apt install wget xz-utils - wget https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz - wget https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz + wget https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz + wget https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz xz -v -d hits_v1.tsv.xz xz -v -d visits_v1.tsv.xz diff --git a/docs/ja/development/index.md b/docs/ja/development/index.md index 4e14fd1a032..d69e9ea0d9e 100644 --- a/docs/ja/development/index.md +++ b/docs/ja/development/index.md @@ -9,4 +9,4 @@ toc_title: "\u96A0\u3057" # ClickHouse開発 {#clickhouse-development} -[元の記事](https://clickhouse.tech/docs/en/development/) +[元の記事](https://clickhouse.com/docs/en/development/) diff --git a/docs/ja/development/style.md b/docs/ja/development/style.md index 596e29f4414..8c5451e4b63 100644 --- a/docs/ja/development/style.md +++ b/docs/ja/development/style.md @@ -830,4 +830,4 @@ function( size_t limit) ``` -[元の記事](https://clickhouse.tech/docs/en/development/style/) +[元の記事](https://clickhouse.com/docs/en/development/style/) diff --git a/docs/ja/engines/database-engines/atomic.md b/docs/ja/engines/database-engines/atomic.md index f019b94a00b..8f76d832764 100644 --- a/docs/ja/engines/database-engines/atomic.md +++ b/docs/ja/engines/database-engines/atomic.md @@ -14,4 +14,4 @@ It is supports non-blocking `DROP` and `RENAME TABLE` queries and atomic `EXCHAN CREATE DATABASE test ENGINE = Atomic; ``` -[Original article](https://clickhouse.tech/docs/en/engines/database_engines/atomic/) +[Original article](https://clickhouse.com/docs/en/engines/database_engines/atomic/) diff --git a/docs/ja/engines/database-engines/index.md b/docs/ja/engines/database-engines/index.md index 1cdd1912b5f..9702430d1f3 100644 --- a/docs/ja/engines/database-engines/index.md +++ b/docs/ja/engines/database-engines/index.md @@ -18,4 +18,4 @@ toc_title: "\u306F\u3058\u3081\u306B" - [怠け者](lazy.md) -[元の記事](https://clickhouse.tech/docs/en/database_engines/) +[元の記事](https://clickhouse.com/docs/en/database_engines/) diff --git a/docs/ja/engines/database-engines/lazy.md b/docs/ja/engines/database-engines/lazy.md index 504907f6894..5086a2e000e 100644 --- a/docs/ja/engines/database-engines/lazy.md +++ b/docs/ja/engines/database-engines/lazy.md @@ -15,4 +15,4 @@ RAM内のテーブルのみを保持 `expiration_time_in_seconds` 最後のア CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds); -[元の記事](https://clickhouse.tech/docs/en/database_engines/lazy/) +[元の記事](https://clickhouse.com/docs/en/database_engines/lazy/) diff --git a/docs/ja/engines/database-engines/materialized-mysql.md b/docs/ja/engines/database-engines/materialized-mysql.md new file mode 120000 index 00000000000..02118b85df4 --- /dev/null +++ b/docs/ja/engines/database-engines/materialized-mysql.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/materialized-mysql.md \ No newline at end of file diff --git a/docs/ja/engines/database-engines/materialized-postgresql.md b/docs/ja/engines/database-engines/materialized-postgresql.md new file mode 120000 index 00000000000..e501cb344bb --- /dev/null +++ b/docs/ja/engines/database-engines/materialized-postgresql.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/materialized-postgresql.md \ No newline at end of file diff --git a/docs/ja/engines/database-engines/mysql.md b/docs/ja/engines/database-engines/mysql.md index efb3893a385..506295af5da 100644 --- a/docs/ja/engines/database-engines/mysql.md +++ b/docs/ja/engines/database-engines/mysql.md @@ -132,4 +132,4 @@ SELECT * FROM mysql_db.mysql_table └────────┴───────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/database_engines/mysql/) +[元の記事](https://clickhouse.com/docs/en/database_engines/mysql/) diff --git a/docs/ja/engines/database-engines/postgresql.md b/docs/ja/engines/database-engines/postgresql.md new file mode 120000 index 00000000000..9405ec25dc2 --- /dev/null +++ b/docs/ja/engines/database-engines/postgresql.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/postgresql.md \ No newline at end of file diff --git a/docs/ja/engines/database-engines/replicated.md b/docs/ja/engines/database-engines/replicated.md new file mode 120000 index 00000000000..065fadff7fd --- /dev/null +++ b/docs/ja/engines/database-engines/replicated.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/replicated.md \ No newline at end of file diff --git a/docs/ja/engines/database-engines/sqlite.md b/docs/ja/engines/database-engines/sqlite.md new file mode 120000 index 00000000000..776734647c2 --- /dev/null +++ b/docs/ja/engines/database-engines/sqlite.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/sqlite.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/index.md b/docs/ja/engines/table-engines/index.md index e1a7b085a29..b904729f45b 100644 --- a/docs/ja/engines/table-engines/index.md +++ b/docs/ja/engines/table-engines/index.md @@ -82,4 +82,4 @@ toc_title: "\u306F\u3058\u3081\u306B" テーブル仮想列のいずれかと同じ名前の列を持つテーブルを作成すると、仮想列にアクセスできなくなります。 これはお勧めしません。 競合を避けるために、仮想列名には通常、アンダースコアが付けられます。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/) diff --git a/docs/ja/engines/table-engines/integrations/ExternalDistributed.md b/docs/ja/engines/table-engines/integrations/ExternalDistributed.md new file mode 120000 index 00000000000..f843983ad4d --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/ExternalDistributed.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/ExternalDistributed.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md b/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md new file mode 120000 index 00000000000..a1eaf673ce1 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/embedded-rocksdb.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/embedded-rocksdb.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/hdfs.md b/docs/ja/engines/table-engines/integrations/hdfs.md index 53e5cd3df34..b6042582890 100644 --- a/docs/ja/engines/table-engines/integrations/hdfs.md +++ b/docs/ja/engines/table-engines/integrations/hdfs.md @@ -120,4 +120,4 @@ CREARE TABLE big_table (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9 - [仮想列](../index.md#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/hdfs/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/hdfs/) diff --git a/docs/ja/engines/table-engines/integrations/jdbc.md b/docs/ja/engines/table-engines/integrations/jdbc.md index d2ac8e9cbfe..6c5bb895ae7 100644 --- a/docs/ja/engines/table-engines/integrations/jdbc.md +++ b/docs/ja/engines/table-engines/integrations/jdbc.md @@ -93,4 +93,4 @@ FROM system.numbers - [JDBCテーブル関数](../../../sql-reference/table-functions/jdbc.md). -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/jdbc/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/jdbc/) diff --git a/docs/ja/engines/table-engines/integrations/kafka.md b/docs/ja/engines/table-engines/integrations/kafka.md index 08e3e951263..e54b7b4252c 100644 --- a/docs/ja/engines/table-engines/integrations/kafka.md +++ b/docs/ja/engines/table-engines/integrations/kafka.md @@ -177,4 +177,4 @@ GraphiteMergeTreeと同様に、KafkaエンジンはClickHouse設定ファイル - [仮想列](../index.md#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/kafka/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/kafka/) diff --git a/docs/ja/engines/table-engines/integrations/materialized-postgresql.md b/docs/ja/engines/table-engines/integrations/materialized-postgresql.md new file mode 120000 index 00000000000..c8dcba4bc19 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/materialized-postgresql.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/materialized-postgresql.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/mongodb.md b/docs/ja/engines/table-engines/integrations/mongodb.md new file mode 120000 index 00000000000..fe2f6b256ce --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/mongodb.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/mongodb.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/mysql.md b/docs/ja/engines/table-engines/integrations/mysql.md index 6b92c8a36ce..1f08486be7d 100644 --- a/docs/ja/engines/table-engines/integrations/mysql.md +++ b/docs/ja/engines/table-engines/integrations/mysql.md @@ -102,4 +102,4 @@ SELECT * FROM mysql_table - [その ‘mysql’ テーブル関数](../../../sql-reference/table-functions/mysql.md) - [外部辞書のソースとしてMySQLを使用する](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-mysql) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/mysql/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/mysql/) diff --git a/docs/ja/engines/table-engines/integrations/odbc.md b/docs/ja/engines/table-engines/integrations/odbc.md index 78709e65e09..7a50f5d6fc0 100644 --- a/docs/ja/engines/table-engines/integrations/odbc.md +++ b/docs/ja/engines/table-engines/integrations/odbc.md @@ -129,4 +129,4 @@ SELECT * FROM odbc_t - [ODBC外部辞書](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-odbc) - [ODBCテーブル関数](../../../sql-reference/table-functions/odbc.md) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/odbc/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/odbc/) diff --git a/docs/ja/engines/table-engines/integrations/postgresql.md b/docs/ja/engines/table-engines/integrations/postgresql.md new file mode 120000 index 00000000000..af3fc116c02 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/postgresql.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/postgresql.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/rabbitmq.md b/docs/ja/engines/table-engines/integrations/rabbitmq.md new file mode 120000 index 00000000000..938c968c15b --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/rabbitmq.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/rabbitmq.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/s3.md b/docs/ja/engines/table-engines/integrations/s3.md new file mode 120000 index 00000000000..68fc96be8e0 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/s3.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/s3.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/integrations/sqlite.md b/docs/ja/engines/table-engines/integrations/sqlite.md new file mode 120000 index 00000000000..56d0a490f52 --- /dev/null +++ b/docs/ja/engines/table-engines/integrations/sqlite.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/sqlite.md \ No newline at end of file diff --git a/docs/ja/engines/table-engines/log-family/index.md b/docs/ja/engines/table-engines/log-family/index.md index 91bbdb0db47..c5729481092 100644 --- a/docs/ja/engines/table-engines/log-family/index.md +++ b/docs/ja/engines/table-engines/log-family/index.md @@ -44,4 +44,4 @@ toc_title: "\u306F\u3058\u3081\u306B" その `Log` と `StripeLog` エンジンの支援並列データです。 読み込み時にデータClickHouse使複数のスレッド)。 各スレッドプロセス別データブロックです。 その `Log` エンジンは、テーブルの各列に個別のファイルを使用します。 `StripeLog` すべてのデータファイルです。 その結果、 `StripeLog` エンジンは、オペレーティングシス `Log` エンジンはデータを読むとき高性能を提供する。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/log_family/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/log_family/) diff --git a/docs/ja/engines/table-engines/log-family/log.md b/docs/ja/engines/table-engines/log-family/log.md index 904c601257f..a609d111ace 100644 --- a/docs/ja/engines/table-engines/log-family/log.md +++ b/docs/ja/engines/table-engines/log-family/log.md @@ -13,4 +13,4 @@ toc_title: "\u30ED\u30B0" 同時データアクセスの場合、読み取り操作は同時に実行できますが、書き込み操作は読み取りをブロックします。 ログエンジ 同様に、テーブルへの書き込みが失敗した場合、テーブルは壊れ、そこから読み込むとエラーが返されます。 ログエンジンは、一時データ、書き込み一度テーブル、およびテストまたはデモの目的に適しています。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/log/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/log/) diff --git a/docs/ja/engines/table-engines/log-family/stripelog.md b/docs/ja/engines/table-engines/log-family/stripelog.md index bbecd50bbea..5083115f127 100644 --- a/docs/ja/engines/table-engines/log-family/stripelog.md +++ b/docs/ja/engines/table-engines/log-family/stripelog.md @@ -92,4 +92,4 @@ SELECT * FROM stripe_log_table ORDER BY timestamp └─────────────────────┴──────────────┴────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/stripelog/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/stripelog/) diff --git a/docs/ja/engines/table-engines/log-family/tinylog.md b/docs/ja/engines/table-engines/log-family/tinylog.md index 1bee48fc53e..d38d02514fc 100644 --- a/docs/ja/engines/table-engines/log-family/tinylog.md +++ b/docs/ja/engines/table-engines/log-family/tinylog.md @@ -13,4 +13,4 @@ toc_title: TinyLog クエリは単一のストリームで実行されます。 言い換えれば、このエンジンは比較的小さなテーブル(最大約1,000,000行)を対象としています。 小さなテーブルが多い場合は、このテーブルエンジンを使用するのが理にかなっています。 [ログ](log.md) エンジン(開く必要の少ないファイル)。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/tinylog/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/tinylog/) diff --git a/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md index d304ec2802d..04c99a1f2dd 100644 --- a/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -102,4 +102,4 @@ GROUP BY StartDate ORDER BY StartDate; ``` -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/aggregatingmergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/aggregatingmergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md index e26172c1fd5..e2506da146d 100644 --- a/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -303,4 +303,4 @@ select * FROM UAct └─────────────────────┴───────────┴──────────┴──────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/collapsingmergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/collapsingmergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md index 30cd3c72af5..047595984ba 100644 --- a/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md +++ b/docs/ja/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -124,4 +124,4 @@ drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 1 16:48 detached ClickHouseでは、パーティションの削除、テーブル間のコピー、またはバックアップの作成などの操作を実行できます。 セクションのすべての操作の一覧を参照してください [パーティションとパーツの操作](../../../sql-reference/statements/alter.md#alter_manipulations-with-partitions). -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/custom_partitioning_key/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/custom_partitioning_key/) diff --git a/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md index 18ab9390f0f..aa2cacbcdaa 100644 --- a/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/graphitemergetree.md @@ -171,4 +171,4 @@ default ``` -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/graphitemergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/graphitemergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/mergetree.md b/docs/ja/engines/table-engines/mergetree-family/mergetree.md index f93d5ea4a64..83ea6866178 100644 --- a/docs/ja/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/mergetree.md @@ -651,4 +651,4 @@ SETTINGS storage_policy = 'moving_from_ssd_to_hdd' バックグラウンドマージと突然変異の完了後、古い部分は一定時間後にのみ削除されます (`old_parts_lifetime`). この間、他のボリュームまたはディスクには移動されません。 したがって、部品が最終的に除去されるまで、それらは占有されたディスク領域の評価のために考慮される。 -[元の記事](https://clickhouse.tech/docs/ru/operations/table_engines/mergetree/) +[元の記事](https://clickhouse.com/docs/ru/operations/table_engines/mergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md index c3df9559415..dcc4c6b1785 100644 --- a/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/replacingmergetree.md @@ -66,4 +66,4 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/replacingmergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/replacingmergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/replication.md b/docs/ja/engines/table-engines/mergetree-family/replication.md index 4e0d2bc0831..195c2453467 100644 --- a/docs/ja/engines/table-engines/mergetree-family/replication.md +++ b/docs/ja/engines/table-engines/mergetree-family/replication.md @@ -215,4 +215,4 @@ sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data ZooKeeperのデータが紛失または破損している場合は、上記のように再生されていないテーブルに移動することでデータを保存できます。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/replication/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/replication/) diff --git a/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md index 356b10037d2..988dd62ca1e 100644 --- a/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/summingmergetree.md @@ -138,4 +138,4 @@ Columnが主キーになく、集計されていない場合は、既存の値 入れ子になったデータ構造の場合、合計のために列のタプルにその列を指定する必要はありません。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/summingmergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/summingmergetree/) diff --git a/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md index 2d323629c4e..7b542199cdc 100644 --- a/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md +++ b/docs/ja/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -236,4 +236,4 @@ SELECT * FROM UAct FINAL これは、データを選択する非常に非効率的な方法です。 大きなテーブルには使用しないでください。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/versionedcollapsingmergetree/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/versionedcollapsingmergetree/) diff --git a/docs/ja/engines/table-engines/special/buffer.md b/docs/ja/engines/table-engines/special/buffer.md index deb38c04692..c93ea279885 100644 --- a/docs/ja/engines/table-engines/special/buffer.md +++ b/docs/ja/engines/table-engines/special/buffer.md @@ -68,4 +68,4 @@ DROP TABLEまたはDETACH TABLEを使用してサーバーを停止すると、 バッファテーブルであっても、一度にデータ行を挿入することは意味がありません。 これにより、毎秒数千行の速度が生成されますが、より大きなデータブロックを挿入すると、毎秒百万行を超える速度が生成されます(セクションを参照 “Performance”). -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/buffer/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/buffer/) diff --git a/docs/ja/engines/table-engines/special/dictionary.md b/docs/ja/engines/table-engines/special/dictionary.md index 9de7c7b78db..09d42aaa7df 100644 --- a/docs/ja/engines/table-engines/special/dictionary.md +++ b/docs/ja/engines/table-engines/special/dictionary.md @@ -94,4 +94,4 @@ select * from products limit 1; └───────────────┴─────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/dictionary/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/dictionary/) diff --git a/docs/ja/engines/table-engines/special/distributed.md b/docs/ja/engines/table-engines/special/distributed.md index 87d8c1bc6d5..7d347b3eeb2 100644 --- a/docs/ja/engines/table-engines/special/distributed.md +++ b/docs/ja/engines/table-engines/special/distributed.md @@ -149,4 +149,4 @@ Max_parallel_replicasオプションを有効にすると、単一のシャー - [仮想列](index.md#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/distributed/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/distributed/) diff --git a/docs/ja/engines/table-engines/special/external-data.md b/docs/ja/engines/table-engines/special/external-data.md index ffa726be923..eac722c92fb 100644 --- a/docs/ja/engines/table-engines/special/external-data.md +++ b/docs/ja/engines/table-engines/special/external-data.md @@ -65,4 +65,4 @@ $ curl -F 'passwd=@passwd.tsv;' 'http://localhost:8123/?query=SELECT+shell,+coun 分散クエリ処理では、一時テーブルがすべてのリモートサーバーに送信されます。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/external_data/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/external_data/) diff --git a/docs/ja/engines/table-engines/special/file.md b/docs/ja/engines/table-engines/special/file.md index 8427c369c2a..b51468407ef 100644 --- a/docs/ja/engines/table-engines/special/file.md +++ b/docs/ja/engines/table-engines/special/file.md @@ -87,4 +87,4 @@ $ echo -e "1,2\n3,4" | clickhouse-local -q "CREATE TABLE table (a Int64, b Int64 - 指数 - 複製 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/file/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/file/) diff --git a/docs/ja/engines/table-engines/special/generate.md b/docs/ja/engines/table-engines/special/generate.md index 58005ed2717..54c209aaf53 100644 --- a/docs/ja/engines/table-engines/special/generate.md +++ b/docs/ja/engines/table-engines/special/generate.md @@ -58,4 +58,4 @@ SELECT * FROM generate_engine_table LIMIT 3 - 指数 - 複製 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/generate/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/generate/) diff --git a/docs/ja/engines/table-engines/special/join.md b/docs/ja/engines/table-engines/special/join.md index bf96f64e7fc..300a76297c8 100644 --- a/docs/ja/engines/table-engines/special/join.md +++ b/docs/ja/engines/table-engines/special/join.md @@ -108,4 +108,4 @@ SELECT joinGet('id_val_join', 'val', toUInt32(1)) 場合はサーバが再起動誤り、データブロックのディスクがいます。 この場合、破損したデータを含むファイルを手動で削除する必要がある場合があります。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/join/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/join/) diff --git a/docs/ja/engines/table-engines/special/materializedview.md b/docs/ja/engines/table-engines/special/materializedview.md index 64b13600bbb..6cfea4249b6 100644 --- a/docs/ja/engines/table-engines/special/materializedview.md +++ b/docs/ja/engines/table-engines/special/materializedview.md @@ -9,4 +9,4 @@ toc_title: "\u30DE\u30C6\u30EA\u30A2\u30E9\u30A4\u30BA\u30C9\u30D3\u30E5\u30FC" マテリアライズドビューの実装に使用されます(詳細については、 [CREATE TABLE](../../../sql-reference/statements/create.md#create-table-query)). データを格納するために、ビューの作成時に指定された別のエンジンを使用します。 読み込み時にテーブルから、使用してこのエンジンです。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/materializedview/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/materializedview/) diff --git a/docs/ja/engines/table-engines/special/memory.md b/docs/ja/engines/table-engines/special/memory.md index c2b50553023..a09d6658463 100644 --- a/docs/ja/engines/table-engines/special/memory.md +++ b/docs/ja/engines/table-engines/special/memory.md @@ -16,4 +16,4 @@ toc_title: "\u30E1\u30E2\u30EA" メモリーのエンジンを使用するシステムの一時テーブルの外部クエリデータの項をご参照ください “External data for processing a query”グローバルでの実装については、セクションを参照 “IN operators”). -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/memory/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/memory/) diff --git a/docs/ja/engines/table-engines/special/merge.md b/docs/ja/engines/table-engines/special/merge.md index 0a22b71964e..10248f98060 100644 --- a/docs/ja/engines/table-engines/special/merge.md +++ b/docs/ja/engines/table-engines/special/merge.md @@ -67,4 +67,4 @@ FROM WatchLog - [仮想列](index.md#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/merge/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/merge/) diff --git a/docs/ja/engines/table-engines/special/null.md b/docs/ja/engines/table-engines/special/null.md index 588500cdcde..328591e6af9 100644 --- a/docs/ja/engines/table-engines/special/null.md +++ b/docs/ja/engines/table-engines/special/null.md @@ -11,4 +11,4 @@ Nullテーブルに書き込む場合、データは無視されます。 Null ただし、Nullテーブルにマテリアライズドビューを作成できます。 したがって、テーブルに書き込まれたデータはビュー内で終了します。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/null/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/null/) diff --git a/docs/ja/engines/table-engines/special/set.md b/docs/ja/engines/table-engines/special/set.md index 2b6cd0a2a9e..5b9a2f0adcc 100644 --- a/docs/ja/engines/table-engines/special/set.md +++ b/docs/ja/engines/table-engines/special/set.md @@ -16,4 +16,4 @@ INSERTを使用すると、テーブルにデータを挿入できます。 新 ラサーバを再起動し、ブロックのデータのディスクが失われることも想定されます。 後者の場合、破損したデータを含むファイルを手動で削除する必要がある場合があります。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/set/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/set/) diff --git a/docs/ja/engines/table-engines/special/url.md b/docs/ja/engines/table-engines/special/url.md index bf920d23be8..ac86f2480db 100644 --- a/docs/ja/engines/table-engines/special/url.md +++ b/docs/ja/engines/table-engines/special/url.md @@ -79,4 +79,4 @@ SELECT * FROM url_engine_table - インデックス。 - 複製。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/url/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/url/) diff --git a/docs/ja/engines/table-engines/special/view.md b/docs/ja/engines/table-engines/special/view.md index 270246bedb9..3ac429b812b 100644 --- a/docs/ja/engines/table-engines/special/view.md +++ b/docs/ja/engines/table-engines/special/view.md @@ -9,4 +9,4 @@ toc_title: "\u8868\u793A" ビューの実装に使用されます(詳細については、 `CREATE VIEW query`). これはデータを格納せず、指定されたデータのみを格納します `SELECT` クエリ。 テーブルから読み取るときに、このクエリが実行されます(クエリから不要な列がすべて削除されます)。 -[元の記事](https://clickhouse.tech/docs/en/operations/table_engines/view/) +[元の記事](https://clickhouse.com/docs/en/operations/table_engines/view/) diff --git a/docs/ja/faq/general.md b/docs/ja/faq/general.md index e7e3f9328f4..5807ef980bc 100644 --- a/docs/ja/faq/general.md +++ b/docs/ja/faq/general.md @@ -57,4 +57,4 @@ $ clickhouse-client --query "SELECT * from table" --format FormatName > result.t 見る [clickhouse-クライアント](../interfaces/cli.md). -{## [元の記事](https://clickhouse.tech/docs/en/faq/general/) ##} +{## [元の記事](https://clickhouse.com/docs/en/faq/general/) ##} diff --git a/docs/ja/faq/general/columnar-database.md b/docs/ja/faq/general/columnar-database.md new file mode 120000 index 00000000000..b7557b62010 --- /dev/null +++ b/docs/ja/faq/general/columnar-database.md @@ -0,0 +1 @@ +../../../en/faq/general/columnar-database.md \ No newline at end of file diff --git a/docs/ja/faq/general/dbms-naming.md b/docs/ja/faq/general/dbms-naming.md new file mode 120000 index 00000000000..0df856af0ca --- /dev/null +++ b/docs/ja/faq/general/dbms-naming.md @@ -0,0 +1 @@ +../../../en/faq/general/dbms-naming.md \ No newline at end of file diff --git a/docs/ja/faq/general/index.md b/docs/ja/faq/general/index.md new file mode 120000 index 00000000000..5ff33ccb360 --- /dev/null +++ b/docs/ja/faq/general/index.md @@ -0,0 +1 @@ +../../../en/faq/general/index.md \ No newline at end of file diff --git a/docs/ja/faq/general/mapreduce.md b/docs/ja/faq/general/mapreduce.md new file mode 120000 index 00000000000..49b79ad4841 --- /dev/null +++ b/docs/ja/faq/general/mapreduce.md @@ -0,0 +1 @@ +../../../en/faq/general/mapreduce.md \ No newline at end of file diff --git a/docs/ja/faq/general/ne-tormozit.md b/docs/ja/faq/general/ne-tormozit.md new file mode 120000 index 00000000000..a8273c56b2d --- /dev/null +++ b/docs/ja/faq/general/ne-tormozit.md @@ -0,0 +1 @@ +../../../en/faq/general/ne-tormozit.md \ No newline at end of file diff --git a/docs/ja/faq/general/olap.md b/docs/ja/faq/general/olap.md new file mode 120000 index 00000000000..99caa8218c8 --- /dev/null +++ b/docs/ja/faq/general/olap.md @@ -0,0 +1 @@ +../../../en/faq/general/olap.md \ No newline at end of file diff --git a/docs/ja/faq/general/who-is-using-clickhouse.md b/docs/ja/faq/general/who-is-using-clickhouse.md new file mode 120000 index 00000000000..b4e9782df7e --- /dev/null +++ b/docs/ja/faq/general/who-is-using-clickhouse.md @@ -0,0 +1 @@ +../../../en/faq/general/who-is-using-clickhouse.md \ No newline at end of file diff --git a/docs/ja/faq/general/why-clickhouse-is-so-fast.md b/docs/ja/faq/general/why-clickhouse-is-so-fast.md new file mode 120000 index 00000000000..77b8c3fcd68 --- /dev/null +++ b/docs/ja/faq/general/why-clickhouse-is-so-fast.md @@ -0,0 +1 @@ +../../../en/faq/general/why-clickhouse-is-so-fast.md \ No newline at end of file diff --git a/docs/ja/faq/integration/file-export.md b/docs/ja/faq/integration/file-export.md new file mode 120000 index 00000000000..19a5c67148b --- /dev/null +++ b/docs/ja/faq/integration/file-export.md @@ -0,0 +1 @@ +../../../en/faq/integration/file-export.md \ No newline at end of file diff --git a/docs/ja/faq/integration/index.md b/docs/ja/faq/integration/index.md new file mode 120000 index 00000000000..8323d6218a3 --- /dev/null +++ b/docs/ja/faq/integration/index.md @@ -0,0 +1 @@ +../../../en/faq/integration/index.md \ No newline at end of file diff --git a/docs/ja/faq/integration/json-import.md b/docs/ja/faq/integration/json-import.md new file mode 120000 index 00000000000..e90f4386602 --- /dev/null +++ b/docs/ja/faq/integration/json-import.md @@ -0,0 +1 @@ +../../../en/faq/integration/json-import.md \ No newline at end of file diff --git a/docs/ja/faq/integration/oracle-odbc.md b/docs/ja/faq/integration/oracle-odbc.md new file mode 120000 index 00000000000..47fe6189ee3 --- /dev/null +++ b/docs/ja/faq/integration/oracle-odbc.md @@ -0,0 +1 @@ +../../../en/faq/integration/oracle-odbc.md \ No newline at end of file diff --git a/docs/ja/faq/operations/delete-old-data.md b/docs/ja/faq/operations/delete-old-data.md new file mode 120000 index 00000000000..aef26953cd3 --- /dev/null +++ b/docs/ja/faq/operations/delete-old-data.md @@ -0,0 +1 @@ +../../../en/faq/operations/delete-old-data.md \ No newline at end of file diff --git a/docs/ja/faq/operations/index.md b/docs/ja/faq/operations/index.md new file mode 120000 index 00000000000..fd141164fdc --- /dev/null +++ b/docs/ja/faq/operations/index.md @@ -0,0 +1 @@ +../../../en/faq/operations/index.md \ No newline at end of file diff --git a/docs/ja/faq/operations/production.md b/docs/ja/faq/operations/production.md new file mode 120000 index 00000000000..8203988975c --- /dev/null +++ b/docs/ja/faq/operations/production.md @@ -0,0 +1 @@ +../../../en/faq/operations/production.md \ No newline at end of file diff --git a/docs/ja/faq/use-cases/index.md b/docs/ja/faq/use-cases/index.md new file mode 120000 index 00000000000..cc545acb000 --- /dev/null +++ b/docs/ja/faq/use-cases/index.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/index.md \ No newline at end of file diff --git a/docs/ja/faq/use-cases/key-value.md b/docs/ja/faq/use-cases/key-value.md new file mode 120000 index 00000000000..63140458d12 --- /dev/null +++ b/docs/ja/faq/use-cases/key-value.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/key-value.md \ No newline at end of file diff --git a/docs/ja/faq/use-cases/time-series.md b/docs/ja/faq/use-cases/time-series.md new file mode 120000 index 00000000000..55cbcfc243f --- /dev/null +++ b/docs/ja/faq/use-cases/time-series.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/time-series.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/amplab-benchmark.md b/docs/ja/getting-started/example-datasets/amplab-benchmark.md index a3f66e1a0de..23d287d8354 100644 --- a/docs/ja/getting-started/example-datasets/amplab-benchmark.md +++ b/docs/ja/getting-started/example-datasets/amplab-benchmark.md @@ -126,4 +126,4 @@ ORDER BY totalRevenue DESC LIMIT 1 ``` -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/amplab_benchmark/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/amplab_benchmark/) diff --git a/docs/ja/getting-started/example-datasets/brown-benchmark.md b/docs/ja/getting-started/example-datasets/brown-benchmark.md new file mode 120000 index 00000000000..1f6e2be14fa --- /dev/null +++ b/docs/ja/getting-started/example-datasets/brown-benchmark.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/brown-benchmark.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/cell-towers.md b/docs/ja/getting-started/example-datasets/cell-towers.md new file mode 120000 index 00000000000..899946803d1 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/cell-towers.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/cell-towers.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/criteo.md b/docs/ja/getting-started/example-datasets/criteo.md index 7690b7d966d..8b85ec11313 100644 --- a/docs/ja/getting-started/example-datasets/criteo.md +++ b/docs/ja/getting-started/example-datasets/criteo.md @@ -76,4 +76,4 @@ INSERT INTO criteo SELECT date, clicked, int1, int2, int3, int4, int5, int6, int DROP TABLE criteo_log; ``` -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/criteo/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/criteo/) diff --git a/docs/ja/getting-started/example-datasets/github-events.md b/docs/ja/getting-started/example-datasets/github-events.md new file mode 120000 index 00000000000..c9649c0a61f --- /dev/null +++ b/docs/ja/getting-started/example-datasets/github-events.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/github-events.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/index.md b/docs/ja/getting-started/example-datasets/index.md index 302d062eab9..f85cead6582 100644 --- a/docs/ja/getting-started/example-datasets/index.md +++ b/docs/ja/getting-started/example-datasets/index.md @@ -17,4 +17,4 @@ toc_title: "イントロダクション" - [ニューヨークタクシ](nyc-taxi.md) - [オンタイム](ontime.md) -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets) diff --git a/docs/ja/getting-started/example-datasets/menus.md b/docs/ja/getting-started/example-datasets/menus.md new file mode 120000 index 00000000000..d82b3198962 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/menus.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/menus.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/metrica.md b/docs/ja/getting-started/example-datasets/metrica.md index 5caf32928c3..c51b43ddda0 100644 --- a/docs/ja/getting-started/example-datasets/metrica.md +++ b/docs/ja/getting-started/example-datasets/metrica.md @@ -9,14 +9,14 @@ toc_title: "Yandex.Metrica データ" Yandex.Metricaについての詳細は [ClickHouse history](../../introduction/history.md) のセクションを参照してください。 データセットは2つのテーブルから構成されており、どちらも圧縮された `tsv.xz` ファイルまたは準備されたパーティションとしてダウンロードすることができます。 -さらに、1億行を含む`hits`テーブルの拡張版が TSVとして https://datasets.clickhouse.tech/hits/tsv/hits_100m_obfuscated_v1.tsv.xz に、準備されたパーティションとして https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz にあります。 +さらに、1億行を含む`hits`テーブルの拡張版が TSVとして https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz に、準備されたパーティションとして https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz にあります。 ## パーティション済みテーブルの取得 {#obtaining-tables-from-prepared-partitions} hits テーブルのダウンロードとインポート: ``` bash -curl -O https://datasets.clickhouse.tech/hits/partitions/hits_v1.tar +curl -O https://datasets.clickhouse.com/hits/partitions/hits_v1.tar tar xvf hits_v1.tar -C /var/lib/clickhouse # ClickHouse のデータディレクトリへのパス # 展開されたデータのパーミッションをチェックし、必要に応じて修正します。 sudo service clickhouse-server restart @@ -26,7 +26,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" visits のダウンロードとインポート: ``` bash -curl -O https://datasets.clickhouse.tech/visits/partitions/visits_v1.tar +curl -O https://datasets.clickhouse.com/visits/partitions/visits_v1.tar tar xvf visits_v1.tar -C /var/lib/clickhouse # ClickHouse のデータディレクトリへのパス # 展開されたデータのパーミッションをチェックし、必要に応じて修正します。 sudo service clickhouse-server restart @@ -38,7 +38,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.visits_v1" 圧縮TSVファイルのダウンロードと hits テーブルのインポート: ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv # now create table clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" clickhouse-client --query "CREATE TABLE datasets.hits_v1 ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" @@ -52,7 +52,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" 圧縮TSVファイルのダウンロードと visits テーブルのインポート: ``` bash -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv # now create table clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" clickhouse-client --query "CREATE TABLE datasets.visits_v1 ( CounterID UInt32, StartDate Date, Sign Int8, IsNew UInt8, VisitID UInt64, UserID UInt64, StartTime DateTime, Duration UInt32, UTCStartTime DateTime, PageViews Int32, Hits Int32, IsBounce UInt8, Referer String, StartURL String, RefererDomain String, StartURLDomain String, EndURL String, LinkURL String, IsDownload UInt8, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, PlaceID Int32, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), IsYandex UInt8, GoalReachesDepth Int32, GoalReachesURL Int32, GoalReachesAny Int32, SocialSourceNetworkID UInt8, SocialSourcePage String, MobilePhoneModel String, ClientEventTime DateTime, RegionID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RemoteIP UInt32, RemoteIP6 FixedString(16), IPNetworkID UInt32, SilverlightVersion3 UInt32, CodeVersion UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, UserAgentMajor UInt16, UserAgentMinor UInt16, WindowClientWidth UInt16, WindowClientHeight UInt16, SilverlightVersion2 UInt8, SilverlightVersion4 UInt16, FlashVersion3 UInt16, FlashVersion4 UInt16, ClientTimeZone Int16, OS UInt8, UserAgent UInt8, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, NetMajor UInt8, NetMinor UInt8, MobilePhone UInt8, SilverlightVersion1 UInt8, Age UInt8, Sex UInt8, Income UInt8, JavaEnable UInt8, CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, BrowserLanguage UInt16, BrowserCountry UInt16, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), Params Array(String), Goals Nested(ID UInt32, Serial UInt32, EventTime DateTime, Price Int64, OrderID String, CurrencyID UInt32), WatchIDs Array(UInt64), ParamSumPrice Int64, ParamCurrency FixedString(3), ParamCurrencyID UInt16, ClickLogID UInt64, ClickEventID Int32, ClickGoodEvent Int32, ClickEventTime DateTime, ClickPriorityID Int32, ClickPhraseID Int32, ClickPageID Int32, ClickPlaceID Int32, ClickTypeID Int32, ClickResourceID Int32, ClickCost UInt32, ClickClientIP UInt32, ClickDomainID UInt32, ClickURL String, ClickAttempt UInt8, ClickOrderID UInt32, ClickBannerID UInt32, ClickMarketCategoryID UInt32, ClickMarketPP UInt32, ClickMarketCategoryName String, ClickMarketPPName String, ClickAWAPSCampaignName String, ClickPageName String, ClickTargetType UInt16, ClickTargetPhraseID UInt64, ClickContextType UInt8, ClickSelectType Int8, ClickOptions String, ClickGroupBannerID Int32, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, FirstVisit DateTime, PredLastVisit Date, LastVisit Date, TotalVisits UInt32, TraficSource Nested(ID Int8, SearchEngineID UInt16, AdvEngineID UInt8, PlaceID UInt16, SocialSourceNetworkID UInt8, Domain String, SearchPhrase String, SocialSourcePage String), Attendance FixedString(16), CLID UInt32, YCLID UInt64, NormalizedRefererHash UInt64, SearchPhraseHash UInt64, RefererDomainHash UInt64, NormalizedStartURLHash UInt64, StartURLDomainHash UInt64, NormalizedEndURLHash UInt64, TopLevelDomain UInt64, URLScheme UInt64, OpenstatServiceNameHash UInt64, OpenstatCampaignIDHash UInt64, OpenstatAdIDHash UInt64, OpenstatSourceIDHash UInt64, UTMSourceHash UInt64, UTMMediumHash UInt64, UTMCampaignHash UInt64, UTMContentHash UInt64, UTMTermHash UInt64, FromHash UInt64, WebVisorEnabled UInt8, WebVisorActivity UInt32, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), Market Nested(Type UInt8, GoalID UInt32, OrderID String, OrderPrice Int64, PP UInt32, DirectPlaceID UInt32, DirectOrderID UInt32, DirectBannerID UInt32, GoodID String, GoodName String, GoodQuantity Int32, GoodPrice Int64), IslandID FixedString(16)) ENGINE = CollapsingMergeTree(Sign) PARTITION BY toYYYYMM(StartDate) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" diff --git a/docs/ja/getting-started/example-datasets/nyc-taxi.md b/docs/ja/getting-started/example-datasets/nyc-taxi.md index a717b64b2b2..e4864c74358 100644 --- a/docs/ja/getting-started/example-datasets/nyc-taxi.md +++ b/docs/ja/getting-started/example-datasets/nyc-taxi.md @@ -286,7 +286,7 @@ SELECT formatReadableSize(sum(bytes)) FROM system.parts WHERE table = 'trips_mer ## パーティションされたデータのダウンロード {#download-of-prepared-partitions} ``` bash -$ curl -O https://datasets.clickhouse.tech/trips_mergetree/partitions/trips_mergetree.tar +$ curl -O https://datasets.clickhouse.com/trips_mergetree/partitions/trips_mergetree.tar $ tar xvf trips_mergetree.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -388,4 +388,4 @@ Q4:0.072秒 | 3 | 0.212 | 0.438 | 0.733 | 1.241 | | 140 | 0.028 | 0.043 | 0.051 | 0.072 | -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/nyc_taxi/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/nyc_taxi/) diff --git a/docs/ja/getting-started/example-datasets/ontime.md b/docs/ja/getting-started/example-datasets/ontime.md index d12d8a36069..2a951af6026 100644 --- a/docs/ja/getting-started/example-datasets/ontime.md +++ b/docs/ja/getting-started/example-datasets/ontime.md @@ -155,7 +155,7 @@ ls -1 *.zip | xargs -I{} -P $(nproc) bash -c "echo {}; unzip -cq {} '*.csv' | se ## パーティション済みデータのダウンロード {#download-of-prepared-partitions} ``` bash -$ curl -O https://datasets.clickhouse.tech/ontime/partitions/ontime.tar +$ curl -O https://datasets.clickhouse.com/ontime/partitions/ontime.tar $ tar xvf ontime.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -408,4 +408,4 @@ LIMIT 10; - https://www.percona.com/blog/2016/01/07/apache-spark-with-air-ontime-performance-data/ - http://nickmakos.blogspot.ru/2012/08/analyzing-air-traffic-performance-with.html -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/ontime/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/ontime/) diff --git a/docs/ja/getting-started/example-datasets/opensky.md b/docs/ja/getting-started/example-datasets/opensky.md new file mode 120000 index 00000000000..4305c0cac3c --- /dev/null +++ b/docs/ja/getting-started/example-datasets/opensky.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/opensky.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/recipes.md b/docs/ja/getting-started/example-datasets/recipes.md new file mode 120000 index 00000000000..4fdaa5de5b8 --- /dev/null +++ b/docs/ja/getting-started/example-datasets/recipes.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/recipes.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/star-schema.md b/docs/ja/getting-started/example-datasets/star-schema.md index a01074ba50a..b8aa38c737f 100644 --- a/docs/ja/getting-started/example-datasets/star-schema.md +++ b/docs/ja/getting-started/example-datasets/star-schema.md @@ -365,4 +365,4 @@ ORDER BY P_BRAND ASC; ``` -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/star_schema/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/star_schema/) diff --git a/docs/ja/getting-started/example-datasets/uk-price-paid.md b/docs/ja/getting-started/example-datasets/uk-price-paid.md new file mode 120000 index 00000000000..e48bcf21d7b --- /dev/null +++ b/docs/ja/getting-started/example-datasets/uk-price-paid.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/uk-price-paid.md \ No newline at end of file diff --git a/docs/ja/getting-started/example-datasets/wikistat.md b/docs/ja/getting-started/example-datasets/wikistat.md index 50d71faf963..0ef80455b66 100644 --- a/docs/ja/getting-started/example-datasets/wikistat.md +++ b/docs/ja/getting-started/example-datasets/wikistat.md @@ -30,4 +30,4 @@ $ cat links.txt | while read link; do wget http://dumps.wikimedia.org/other/page $ ls -1 /opt/wikistat/ | grep gz | while read i; do echo $i; gzip -cd /opt/wikistat/$i | ./wikistat-loader --time="$(echo -n $i | sed -r 's/pagecounts-([0-9]{4})([0-9]{2})([0-9]{2})-([0-9]{2})([0-9]{2})([0-9]{2})\.gz/\1-\2-\3 \4-00-00/')" | clickhouse-client --query="INSERT INTO wikistat FORMAT TabSeparated"; done ``` -[元の記事](https://clickhouse.tech/docs/en/getting_started/example_datasets/wikistat/) +[元の記事](https://clickhouse.com/docs/en/getting_started/example_datasets/wikistat/) diff --git a/docs/ja/getting-started/index.md b/docs/ja/getting-started/index.md index fffa07f2a2c..7c3592318ae 100644 --- a/docs/ja/getting-started/index.md +++ b/docs/ja/getting-started/index.md @@ -13,4 +13,4 @@ toc_title: hidden - [詳細なチュートリアル](../getting-started/tutorial.md) - [データセット例を用いて試す](../getting-started/example-datasets/ontime.md) -[元の記事](https://clickhouse.tech/docs/en/getting_started/) +[元の記事](https://clickhouse.com/docs/en/getting_started/) diff --git a/docs/ja/getting-started/install.md b/docs/ja/getting-started/install.md index 81df2df7da7..7a2a822fe52 100644 --- a/docs/ja/getting-started/install.md +++ b/docs/ja/getting-started/install.md @@ -30,7 +30,7 @@ Debian や Ubuntu 用にコンパイル済みの公式パッケージ `deb` を 最新版を使いたい場合は、`stable`を`testing`に置き換えてください。(テスト環境ではこれを推奨します) -同様に、[こちら](https://repo.clickhouse.tech/deb/stable/main/)からパッケージをダウンロードして、手動でインストールすることもできます。 +同様に、[こちら](https://repo.clickhouse.com/deb/stable/main/)からパッケージをダウンロードして、手動でインストールすることもできます。 #### パッケージ {#packages} @@ -47,8 +47,8 @@ CentOS、RedHat、その他すべてのrpmベースのLinuxディストリビュ ``` bash sudo yum install yum-utils -sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG -sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64 +sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG +sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/stable/x86_64 ``` 最新版を使いたい場合は `stable` を `testing` に置き換えてください。(テスト環境ではこれが推奨されています)。`prestable` もしばしば同様に利用できます。 @@ -59,20 +59,20 @@ sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_6 sudo yum install clickhouse-server clickhouse-client ``` -同様に、[こちら](https://repo.clickhouse.tech/rpm/stable/x86_64) からパッケージをダウンロードして、手動でインストールすることもできます。 +同様に、[こちら](https://repo.clickhouse.com/rpm/stable/x86_64) からパッケージをダウンロードして、手動でインストールすることもできます。 ### Tgzアーカイブから {#from-tgz-archives} すべての Linux ディストリビューションで、`deb` や `rpm` パッケージがインストールできない場合は、公式のコンパイル済み `tgz` アーカイブを使用することをお勧めします。 -必要なバージョンは、リポジトリ https://repo.clickhouse.tech/tgz/ から `curl` または `wget` でダウンロードできます。その後、ダウンロードしたアーカイブを解凍し、インストールスクリプトでインストールしてください。最新版の例は以下です: +必要なバージョンは、リポジトリ https://repo.clickhouse.com/tgz/ から `curl` または `wget` でダウンロードできます。その後、ダウンロードしたアーカイブを解凍し、インストールスクリプトでインストールしてください。最新版の例は以下です: ``` bash export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1` -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-server-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-client-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-server-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-client-$LATEST_VERSION.tgz tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh @@ -92,16 +92,16 @@ sudo clickhouse-client-$LATEST_VERSION/install/doinst.sh ### Dockerイメージから {#from-docker-image} -Docker内でClickHouseを実行するには、次の [DockerHub](https://hub.docker.com/r/yandex/clickhouse-server/) のガイドに従います。それらのイメージでは内部で公式の `deb` パッケージを使っています。 +Docker内でClickHouseを実行するには、次の [DockerHub](https://hub.docker.com/r/clickhouse/clickhouse-server/) のガイドに従います。それらのイメージでは内部で公式の `deb` パッケージを使っています。 ### 非標準環境向けの事前コンパイルされたバイナリから {#from-binaries-non-linux} 非LinuxオペレーティングシステムとAArch64 CPUアーキテクチャのために、ClickHouseのビルドは `master` ブランチの最新のコミットからクロスコンパイルされたバイナリを提供しています。(数時間の遅延があります) -- [macOS](https://builds.clickhouse.tech/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/macos/clickhouse' && chmod a+x ./clickhouse` -- [FreeBSD](https://builds.clickhouse.tech/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/freebsd/clickhouse' && chmod a+x ./clickhouse` -- [AArch64](https://builds.clickhouse.tech/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/aarch64/clickhouse' && chmod a+x ./clickhouse` +- [macOS](https://builds.clickhouse.com/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/macos/clickhouse' && chmod a+x ./clickhouse` +- [FreeBSD](https://builds.clickhouse.com/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/freebsd/clickhouse' && chmod a+x ./clickhouse` +- [AArch64](https://builds.clickhouse.com/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/aarch64/clickhouse' && chmod a+x ./clickhouse` ダウンロード後、`clickhouse client` を使ってサーバーに接続したり、`clickhouse local` を使ってローカルデータを処理したりすることができます。`clickhouse server` を実行するには、GitHubから[server](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.xml)と[users](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/users.xml)の設定ファイルを追加でダウンロードする必要があります。 @@ -186,6 +186,6 @@ SELECT 1 **おめでとうございます!システムが動きました!** -動作確認を続けるには、テストデータセットをダウンロードするか、[チュートリアル](https://clickhouse.tech/tutorial.html)を参照してください。 +動作確認を続けるには、テストデータセットをダウンロードするか、[チュートリアル](https://clickhouse.com/tutorial.html)を参照してください。 -[元の記事](https://clickhouse.tech/docs/en/getting_started/install/) +[元の記事](https://clickhouse.com/docs/en/getting_started/install/) diff --git a/docs/ja/getting-started/playground.md b/docs/ja/getting-started/playground.md index 3a2e59aa104..905a26d6570 100644 --- a/docs/ja/getting-started/playground.md +++ b/docs/ja/getting-started/playground.md @@ -5,7 +5,7 @@ toc_title: Playground # ClickHouse Playground {#clickhouse-playground} -[ClickHouse Playground](https://play.clickhouse.tech) では、サーバーやクラスタを設定することなく、即座にクエリを実行して ClickHouse を試すことができます。 +[ClickHouse Playground](https://play.clickhouse.com) では、サーバーやクラスタを設定することなく、即座にクエリを実行して ClickHouse を試すことができます。 いくつかの例のデータセットは、Playground だけでなく、ClickHouse の機能を示すサンプルクエリとして利用可能です. また、 ClickHouse の LTS リリースで試すこともできます。 ClickHouse Playground は、[Yandex.Cloud](https://cloud.yandex.com/)にホストされている m2.small [Managed Service for ClickHouse](https://cloud.yandex.com/services/managed-clickhouse) インスタンス(4 vCPU, 32 GB RAM) で提供されています。クラウドプロバイダの詳細情報については[こちら](../commercial/cloud.md)。 @@ -17,16 +17,16 @@ ClickHouse をサポートするソフトウェア製品の詳細情報は[こ | パラメータ | 値 | | :---------------------------- | :-------------------------------------- | -| HTTPS エンドポイント | `https://play-api.clickhouse.tech:8443` | -| ネイティブ TCP エンドポイント | `play-api.clickhouse.tech:9440` | +| HTTPS エンドポイント | `https://play-api.clickhouse.com:8443` | +| ネイティブ TCP エンドポイント | `play-api.clickhouse.com:9440` | | ユーザ名 | `playgrounnd` | | パスワード | `clickhouse` | 特定のClickHouseのリリースで試すために、追加のエンドポイントがあります。(ポートとユーザー/パスワードは上記と同じです)。 -- 20.3 LTS: `play-api-v20-3.clickhouse.tech` -- 19.14 LTS: `play-api-v19-14.clickhouse.tech` +- 20.3 LTS: `play-api-v20-3.clickhouse.com` +- 19.14 LTS: `play-api-v19-14.clickhouse.com` !!! note "備考" これらのエンドポイントはすべて、安全なTLS接続が必要です。 @@ -51,13 +51,13 @@ ClickHouse をサポートするソフトウェア製品の詳細情報は[こ `curl` を用いて HTTPSエンドポイントへ接続する例: ``` bash -curl "https://play-api.clickhouse.tech:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" +curl "https://play-api.clickhouse.com:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" ``` [CLI](../interfaces/cli.md) で TCP エンドポイントへ接続する例: ``` bash -clickhouse client --secure -h play-api.clickhouse.tech --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" +clickhouse client --secure -h play-api.clickhouse.com --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" ``` ## 実装の詳細 {#implementation-details} diff --git a/docs/ja/getting-started/tutorial.md b/docs/ja/getting-started/tutorial.md index 82459944015..f80343cbad6 100644 --- a/docs/ja/getting-started/tutorial.md +++ b/docs/ja/getting-started/tutorial.md @@ -92,8 +92,8 @@ ClickHouseサーバーにいくつかのサンプルデータを入れてみま ### テーブルデータのダウンロードと展開 {#download-and-extract-table-data} ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv ``` 展開されたファイルのサイズは約10GBです。 @@ -687,4 +687,4 @@ INSERT INTO tutorial.hits_replica SELECT * FROM tutorial.hits_local; 他のレプリカはデータを同期させ、再びアクティブになると整合性を修復します。 この方法では、最近挿入されたデータが失われる可能性が低いことに注意してください。 -[元の記事](https://clickhouse.tech/docs/en/getting_started/tutorial/) +[元の記事](https://clickhouse.com/docs/en/getting_started/tutorial/) diff --git a/docs/ja/guides/apply-catboost-model.md b/docs/ja/guides/apply-catboost-model.md index e3adb19c6c7..3fb90d90619 100644 --- a/docs/ja/guides/apply-catboost-model.md +++ b/docs/ja/guides/apply-catboost-model.md @@ -236,4 +236,4 @@ FROM !!! note "注" 詳細について [avg()](../sql-reference/aggregate-functions/reference.md#agg_function-avg) と [ログ()](../sql-reference/functions/math-functions.md) 機能。 -[元の記事](https://clickhouse.tech/docs/en/guides/apply_catboost_model/) +[元の記事](https://clickhouse.com/docs/en/guides/apply_catboost_model/) diff --git a/docs/ja/guides/index.md b/docs/ja/guides/index.md index 585fe7fa983..97d6d4f9ad7 100644 --- a/docs/ja/guides/index.md +++ b/docs/ja/guides/index.md @@ -13,4 +13,4 @@ ClickHouseを使用してさまざまなタスクを解決するのに役立つ - [簡単なクラスター設定のチュートリアル](../getting-started/tutorial.md) - [ClickHouseでのCatBoostモデルの適用](apply-catboost-model.md) -[元の記事](https://clickhouse.tech/docs/en/guides/) +[元の記事](https://clickhouse.com/docs/en/guides/) diff --git a/docs/ja/index.md b/docs/ja/index.md index 3c5117b3a2c..b45bb2ba385 100644 --- a/docs/ja/index.md +++ b/docs/ja/index.md @@ -94,4 +94,4 @@ OLAPシナリオは、他の一般的なシナリオ(OLTPやKey-Valueアクセ CPU効率のために、クエリ言語は宣言型(SQLまたはMDX)、または少なくともベクトル(J、K)でなければなりません。 クエリには、最適化を可能にする暗黙的なループのみを含める必要があります。 -{## [元の記事](https://clickhouse.tech/docs/en/) ##} +{## [元の記事](https://clickhouse.com/docs/en/) ##} diff --git a/docs/ja/interfaces/cli.md b/docs/ja/interfaces/cli.md index 7037fcf5512..2cc9f6246bb 100644 --- a/docs/ja/interfaces/cli.md +++ b/docs/ja/interfaces/cli.md @@ -146,4 +146,4 @@ $ clickhouse-client --param_tuple_in_tuple="(10, ('dt', 10))" -q "SELECT * FROM ``` -[元の記事](https://clickhouse.tech/docs/en/interfaces/cli/) +[元の記事](https://clickhouse.com/docs/en/interfaces/cli/) diff --git a/docs/ja/interfaces/cpp.md b/docs/ja/interfaces/cpp.md index caec195e85d..468b2a90fc0 100644 --- a/docs/ja/interfaces/cpp.md +++ b/docs/ja/interfaces/cpp.md @@ -9,4 +9,4 @@ toc_title: "C++\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30E9\u30A4" のREADMEを参照してください [クリックハウス-cpp](https://github.com/ClickHouse/clickhouse-cpp) リポジトリ。 -[元の記事](https://clickhouse.tech/docs/en/interfaces/cpp/) +[元の記事](https://clickhouse.com/docs/en/interfaces/cpp/) diff --git a/docs/ja/interfaces/formats.md b/docs/ja/interfaces/formats.md index 35cfd4f67fb..bebfd438c1e 100644 --- a/docs/ja/interfaces/formats.md +++ b/docs/ja/interfaces/formats.md @@ -26,7 +26,6 @@ aの結果 `SELECT`、および実行する `INSERT`ファイルバックアッ | [カスタム区切り](#format-customseparated) | ✔ | ✔ | | [値](#data-format-values) | ✔ | ✔ | | [垂直](#vertical) | ✗ | ✔ | -| [VerticalRaw](#verticalraw) | ✗ | ✔ | | [JSON](#json) | ✗ | ✔ | | [JSONCompact](#jsoncompact) | ✗ | ✔ | | [JSONEachRow](#jsoneachrow) | ✔ | ✔ | @@ -819,10 +818,6 @@ test: string with 'quotes' and with some special この形式は、クエリ結果の出力にのみ適していますが、解析(テーブルに挿入するデータの取得)には適していません。 -## VerticalRaw {#verticalraw} - -に類似した [垂直](#vertical) しかし、エスケープ無効で。 この形式は、クエリ結果の出力にのみ適しており、解析(データの受信とテーブルへの挿入)には適していません。 - ## XML {#xml} XML形式は出力にのみ適しており、解析には適していません。 例: @@ -1210,4 +1205,4 @@ e.g. `schemafile.proto:MessageType`. -解析エラーの場合 `JSONEachRow` 新しい行(またはEOF)まですべてのデータをスキップします。 `\n` エラーを正しく数える。 - `Template` と `CustomSeparated` 最後の列の後にdelimiterを使用し、行の間にdelimiterを使用すると、次の行の先頭を見つけることができます。 -[元の記事](https://clickhouse.tech/docs/en/interfaces/formats/) +[元の記事](https://clickhouse.com/docs/en/interfaces/formats/) diff --git a/docs/ja/interfaces/http.md b/docs/ja/interfaces/http.md index 84850c159a4..4ac9cd9e472 100644 --- a/docs/ja/interfaces/http.md +++ b/docs/ja/interfaces/http.md @@ -614,4 +614,4 @@ $ curl -vv -H 'XXX:xxx' 'http://localhost:8123/get_relative_path_static_handler' * Connection #0 to host localhost left intact ``` -[元の記事](https://clickhouse.tech/docs/en/interfaces/http_interface/) +[元の記事](https://clickhouse.com/docs/en/interfaces/http_interface/) diff --git a/docs/ja/interfaces/index.md b/docs/ja/interfaces/index.md index bf93b4f8f66..860742d8290 100644 --- a/docs/ja/interfaces/index.md +++ b/docs/ja/interfaces/index.md @@ -26,4 +26,4 @@ ClickHouseを操作するための幅広いサードパーティのライブラ - [統合](third-party/integrations.md) - [視界面](third-party/gui.md) -[元の記事](https://clickhouse.tech/docs/en/interfaces/) +[元の記事](https://clickhouse.com/docs/en/interfaces/) diff --git a/docs/ja/interfaces/jdbc.md b/docs/ja/interfaces/jdbc.md index 6dc8f36c58d..077c4a13a17 100644 --- a/docs/ja/interfaces/jdbc.md +++ b/docs/ja/interfaces/jdbc.md @@ -12,4 +12,4 @@ toc_title: "JDBC\u30C9\u30E9\u30A4\u30D0" - [ClickHouse-Native-JDBC](https://github.com/housepower/ClickHouse-Native-JDBC) - [clickhouse4j](https://github.com/blynkkk/clickhouse4j) -[元の記事](https://clickhouse.tech/docs/en/interfaces/jdbc/) +[元の記事](https://clickhouse.com/docs/en/interfaces/jdbc/) diff --git a/docs/ja/interfaces/mysql.md b/docs/ja/interfaces/mysql.md index 21a3f0fb98a..30eb3bc7618 100644 --- a/docs/ja/interfaces/mysql.md +++ b/docs/ja/interfaces/mysql.md @@ -46,4 +46,4 @@ mysql> - 一部のデータ型は文字列として送信されます -[元の記事](https://clickhouse.tech/docs/en/interfaces/mysql/) +[元の記事](https://clickhouse.com/docs/en/interfaces/mysql/) diff --git a/docs/ja/interfaces/odbc.md b/docs/ja/interfaces/odbc.md index a40047eb04f..570d53df791 100644 --- a/docs/ja/interfaces/odbc.md +++ b/docs/ja/interfaces/odbc.md @@ -9,4 +9,4 @@ toc_title: "ODBC\u30C9\u30E9\u30A4\u30D0" - [公式ドライバー](https://github.com/ClickHouse/clickhouse-odbc). -[元の記事](https://clickhouse.tech/docs/en/interfaces/odbc/) +[元の記事](https://clickhouse.com/docs/en/interfaces/odbc/) diff --git a/docs/ja/interfaces/tcp.md b/docs/ja/interfaces/tcp.md index 6f7df838be6..549a031bf6b 100644 --- a/docs/ja/interfaces/tcp.md +++ b/docs/ja/interfaces/tcp.md @@ -9,4 +9,4 @@ toc_title: "\u30CD\u30A4\u30C6\u30A3\u30D6\u30A4)" ネイティブプロトコルは [コマンド行クライアント](cli.md)、分散クエリ処理中のサーバー間通信、および他のC++プログラムでも使用できます。 残念ながら、ネイティブClickHouseプロトコルは形式的仕様記述を利用できるバーからClickHouseソースコードを開始 [この辺り](https://github.com/ClickHouse/ClickHouse/tree/master/src/Client) や傍受し、分析すTCPます。 -[元の記事](https://clickhouse.tech/docs/en/interfaces/tcp/) +[元の記事](https://clickhouse.com/docs/en/interfaces/tcp/) diff --git a/docs/ja/interfaces/third-party/client-libraries.md b/docs/ja/interfaces/third-party/client-libraries.md index c7bd368bc4c..d7766687f23 100644 --- a/docs/ja/interfaces/third-party/client-libraries.md +++ b/docs/ja/interfaces/third-party/client-libraries.md @@ -59,4 +59,4 @@ toc_title: "\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8" - Nim - [ニム-クリックハウス](https://github.com/leonardoce/nim-clickhouse) -[元の記事](https://clickhouse.tech/docs/en/interfaces/third-party/client_libraries/) +[元の記事](https://clickhouse.com/docs/en/interfaces/third-party/client_libraries/) diff --git a/docs/ja/interfaces/third-party/gui.md b/docs/ja/interfaces/third-party/gui.md index 13b178984d3..d10bec7af5f 100644 --- a/docs/ja/interfaces/third-party/gui.md +++ b/docs/ja/interfaces/third-party/gui.md @@ -153,4 +153,4 @@ toc_title: "\u8996\u754C\u9762" [LookerでClickHouseを設定する方法。](https://docs.looker.com/setup-and-management/database-config/clickhouse) -[元の記事](https://clickhouse.tech/docs/en/interfaces/third-party/gui/) +[元の記事](https://clickhouse.com/docs/en/interfaces/third-party/gui/) diff --git a/docs/ja/interfaces/third-party/integrations.md b/docs/ja/interfaces/third-party/integrations.md index 1cf996a3011..58ff96c728d 100644 --- a/docs/ja/interfaces/third-party/integrations.md +++ b/docs/ja/interfaces/third-party/integrations.md @@ -44,7 +44,7 @@ toc_title: "\u7D71\u5408" - [mfedotov/クリックハウス](https://forge.puppet.com/mfedotov/clickhouse) - 監視 - [黒鉛](https://graphiteapp.org) - - [グラファウス](https://github.com/yandex/graphouse) + - [グラファウス](https://github.com/ClickHouse/graphouse) - [カーボンクリックハウス](https://github.com/lomik/carbon-clickhouse) - [グラファイト-クリック](https://github.com/lomik/graphite-clickhouse) - [黒鉛-ch-オプティマイザー](https://github.com/innogames/graphite-ch-optimizer) -staled仕切りを最大限に活用する [\*GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md#graphitemergetree) からのルールの場合 [ロールアップ構成](../../engines/table-engines/mergetree-family/graphitemergetree.md#rollup-configuration) 応用できます @@ -107,4 +107,4 @@ toc_title: "\u7D71\u5408" - [GraphQL](https://github.com/graphql) - [activecube-graphql](https://github.com/bitquery/activecube-graphql) -[元の記事](https://clickhouse.tech/docs/en/interfaces/third-party/integrations/) +[元の記事](https://clickhouse.com/docs/en/interfaces/third-party/integrations/) diff --git a/docs/ja/interfaces/third-party/proxy.md b/docs/ja/interfaces/third-party/proxy.md index e817b743787..5bd5b042d7b 100644 --- a/docs/ja/interfaces/third-party/proxy.md +++ b/docs/ja/interfaces/third-party/proxy.md @@ -43,4 +43,4 @@ Goで実装。 Goで実装。 -[元の記事](https://clickhouse.tech/docs/en/interfaces/third-party/proxy/) +[元の記事](https://clickhouse.com/docs/en/interfaces/third-party/proxy/) diff --git a/docs/ja/introduction/adopters.md b/docs/ja/introduction/adopters.md index a1a89f6795f..6f878bf1dfe 100644 --- a/docs/ja/introduction/adopters.md +++ b/docs/ja/introduction/adopters.md @@ -13,11 +13,11 @@ toc_title: "\u30A2\u30C0\u30D7\u30BF\u30FC" | 会社 | 産業 | Usecase | 集りのサイズ | (Un)圧縮データサイズ\* | 参照 | |------------------------------------------------------------------------------------------------|------------------------------|----------------------|---------------------------------------------------|--------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 2gis | 地図 | 監視 | — | — | [2019年ロシア語](https://youtu.be/58sPkXfq6nw) | -| Aloha Browser | モバイルアプリ | ブラウザバックエンド | — | — | [ロシア語でのスライド,月2019](https://github.com/yandex/clickhouse-presentations/blob/master/meetup22/aloha.pdf) | +| Aloha Browser | モバイルアプリ | ブラウザバックエンド | — | — | [ロシア語でのスライド,月2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/aloha.pdf) | | アマデウス | 旅行 | 分析 | — | — | [プレスリリース,April2018](https://www.altinity.com/blog/2018/4/5/amadeus-technologies-launches-investment-and-insights-tool-based-on-machine-learning-and-strategy-algorithms) | | Appsflyer | モバイル分析 | 主な製品 | — | — | [2019年ロシア語](https://www.youtube.com/watch?v=M3wbRlcpBbY) | | ArenaData | データ基盤 | 主な製品 | — | — | [2019年ロシア](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup38/indexes.pdf) | -| バドゥ | デート | 時系列 | — | — | [2019年ロシア](https://presentations.clickhouse.tech/meetup38/forecast.pdf) | +| バドゥ | デート | 時系列 | — | — | [2019年ロシア](https://presentations.clickhouse.com/meetup38/forecast.pdf) | | ベノク | ネットワークテレメトリと分析 | 主な製品 | — | — | [スライド英語,October2017](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup9/lpm.pdf) | | ブルームバーグ | 金融、メディア | 監視 | 102サーバー | — | [スライド2018](https://www.slideshare.net/Altinity/http-analytics-for-6m-requests-per-second-using-clickhouse-by-alexander-bocharov) | | Bloxy | Blockchain | 分析 | — | — | [ロシア語でのスライド,八月2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/4_bloxy.pptx) | @@ -37,7 +37,7 @@ toc_title: "\u30A2\u30C0\u30D7\u30BF\u30FC" | Exness | 取引 | 指標、ロギング | — | — | [ロシア語で話す,May2019](https://youtu.be/_rpU-TvSfZ8?t=3215) | | 魔神 | 広告ネットワーク | 主な製品 | — | — | [ブログ投稿日本語,July2017](https://tech.geniee.co.jp/entry/2017/07/20/160100) | | HUYA | ビデオストリーミング | 分析 | — | — | [中国語でのスライド,October2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/7.%20ClickHouse万亿数据分析实践%20李本旺(sundy-li)%20虎牙.pdf) | -| イデアリスタ | 不動産 | 分析 | — | — | [ブログ投稿英語,April2019](https://clickhouse.tech/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | +| イデアリスタ | 不動産 | 分析 | — | — | [ブログ投稿英語,April2019](https://clickhouse.com/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | | インフォビスタ | ネット | 分析 | — | — | [2019年のスライド](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup30/infovista.pdf) | | InnoGames | ゲーム | 指標、ロギング | — | — | [2019年ロシア](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/graphite_and_clickHouse.pdf) | | インテグロス | Platformビデオサービス | 分析 | — | — | [ロシア語でのスライド,月2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | @@ -66,15 +66,15 @@ toc_title: "\u30A2\u30C0\u30D7\u30BF\u30FC" | Splunk | ビジネス分析 | 主な製品 | — | — | [2018年のスライド](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup12/splunk.pdf) | | Spotify | 音楽 | 実験 | — | — | [スライド2018](https://www.slideshare.net/glebus/using-clickhouse-for-experimentation-104247173) | | テンセント | ビッグデータ | データ処理 | — | — | [中国語でのスライド,October2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/5.%20ClickHouse大数据集群应用_李俊飞腾讯网媒事业部.pdf) | -| Uber | タクシー | ロギング | — | — | [スライド2020](https://presentations.clickhouse.tech/meetup40/uber.pdf) | +| Uber | タクシー | ロギング | — | — | [スライド2020](https://presentations.clickhouse.com/meetup40/uber.pdf) | | VKontakte | ソーシャルネ | 統計、ロギング | — | — | [ロシア語でのスライド,八月2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/3_vk.pdf) | | Wisebits | ITソリューショ | 分析 | — | — | [ロシア語でのスライド,月2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | | Xiaoxin Tech | 教育 | 共通の目的 | — | — | [2019年のスライド](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/sync-clickhouse-with-mysql-mongodb.pptx) | | シマラヤ | オーディオ共有 | OLAP | — | — | [2019年のスライド](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/ximalaya.pdf) | | Yandex Cloud | パブリック | 主な製品 | — | — | [2019年ロシア語](https://www.youtube.com/watch?v=pgnak9e_E0o) | -| Yandex DataLens | ビジネス情報 | 主な製品 | — | — | [2019年ロシア](https://presentations.clickhouse.tech/meetup38/datalens.pdf) | +| Yandex DataLens | ビジネス情報 | 主な製品 | — | — | [2019年ロシア](https://presentations.clickhouse.com/meetup38/datalens.pdf) | | Yandex Market | eコマース | 指標、ロギング | — | — | [2019年ロシア語](https://youtu.be/_l1qP0DyBcA?t=478) | -| Yandex Metrica | ウェブ分析 | 主な製品 | 一つのクラスタに360台、一つの部門に1862台のサーバ | 66.41PiB/5.68PiB | [スライド2020](https://presentations.clickhouse.tech/meetup40/introduction/#13) | +| Yandex Metrica | ウェブ分析 | 主な製品 | 一つのクラスタに360台、一つの部門に1862台のサーバ | 66.41PiB/5.68PiB | [スライド2020](https://presentations.clickhouse.com/meetup40/introduction/#13) | | ЦВТ | ソフトウェア開発 | 指標、ロギング | — | — | [ブログ投稿,月2019,ロシア語で](https://vc.ru/dev/62715-kak-my-stroili-monitoring-na-prometheus-clickhouse-i-elk) | | МКБ | 銀行 | Webシステム監視 | — | — | [2019年ロシア](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/mkb.pdf) | | Jinshuju 金数据 | BI分析 | 主な製品 | — | — | [2019年の中国](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup24/3.%20金数据数据架构调整方案Public.pdf) | @@ -83,4 +83,4 @@ toc_title: "\u30A2\u30C0\u30D7\u30BF\u30FC" | Crazypanda | ゲーム | | — | — | ClickHouse meetupのライブセッション | | FunCorp | ゲーム | | — | — | [記事](https://www.altinity.com/blog/migrating-from-redshift-to-clickhouse) | -[元の記事](https://clickhouse.tech/docs/en/introduction/adopters/) +[元の記事](https://clickhouse.com/docs/en/introduction/adopters/) diff --git a/docs/ja/introduction/distinctive-features.md b/docs/ja/introduction/distinctive-features.md index 88dc91e0a3b..154b7d6ace3 100644 --- a/docs/ja/introduction/distinctive-features.md +++ b/docs/ja/introduction/distinctive-features.md @@ -69,4 +69,4 @@ ClickHouseには、精度を犠牲にしてパフォーマンスを得るため 2. 既に挿入されたデータの変更または削除を、高頻度かつ低遅延に行う機能はありません。 [GDPR](https://gdpr-info.eu)に準拠するなど、データをクリーンアップまたは変更するために、バッチ削除およびバッチ更新が利用可能です。 3. インデックスが疎であるため、ClickHouseは、キーで単一行を取得するようなクエリにはあまり適していません。 -[Original article](https://clickhouse.tech/docs/en/introduction/distinctive_features/) +[Original article](https://clickhouse.com/docs/en/introduction/distinctive_features/) diff --git a/docs/ja/introduction/history.md b/docs/ja/introduction/history.md index 162ed3ba415..c1f82c0b2cf 100644 --- a/docs/ja/introduction/history.md +++ b/docs/ja/introduction/history.md @@ -48,4 +48,4 @@ Yandex.Metricaには、Metrageと呼ばれるデータを集計するための OLAPServerの制限を取り除き、レポートのための非集計データを扱う問題を解決するために、私達は ClickHouse DBMSを開発しました。 -[Original article](https://clickhouse.tech/docs/en/introduction/history/) +[Original article](https://clickhouse.com/docs/en/introduction/history/) diff --git a/docs/ja/introduction/performance.md b/docs/ja/introduction/performance.md index 7750a10c0ec..412ddb65211 100644 --- a/docs/ja/introduction/performance.md +++ b/docs/ja/introduction/performance.md @@ -5,9 +5,9 @@ toc_title: "\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9" # パフォーマンス {#pahuomansu} -Yandexの内部テスト結果によると、ClickHouseは、テスト可能なクラスのシステム間で同等の動作シナリオで最高のパフォーマンス(長時間のクエリで最も高いスループットと、短時間のクエリで最小のレイテンシの両方)を示します。 [別のページで](https://clickhouse.tech/benchmark/dbms/)テスト結果を表示できます 。 +Yandexの内部テスト結果によると、ClickHouseは、テスト可能なクラスのシステム間で同等の動作シナリオで最高のパフォーマンス(長時間のクエリで最も高いスループットと、短時間のクエリで最小のレイテンシの両方)を示します。 [別のページで](https://clickhouse.com/benchmark/dbms/)テスト結果を表示できます 。 -これは、多数の独立したベンチマークでも確認されています。インターネット検索で見つけることは難しくありませんし、 [私達がまとめた関連リンク集](https://clickhouse.tech/#independent-benchmarks) から見つけることもできます。 +これは、多数の独立したベンチマークでも確認されています。インターネット検索で見つけることは難しくありませんし、 [私達がまとめた関連リンク集](https://clickhouse.com/#independent-benchmarks) から見つけることもできます。 ## 単一の巨大なクエリのスループット {#dan-yi-noju-da-nakuerinosurupututo} @@ -27,4 +27,4 @@ Yandexの内部テスト結果によると、ClickHouseは、テスト可能な 少なくとも1000行のパケットにデータを挿入することをお勧めします。または、1秒あたり1回のリクエストを超えないでください。タブ区切りのダンプデータをMergeTreeテーブルに挿入する場合、挿入速度は50〜200MB/sになります。挿入された行のサイズが約1Kbの場合、速度は毎秒50,000〜200,000行になります。行が小さい場合、パフォーマンスは1秒あたりの行数で高くなります(Banner System データ- `>` 500,000行/秒、Graphite データ- `>` 1,000,000行/秒)。パフォーマンスを向上させるために、複数のINSERTクエリを並行して作成することで、パフォーマンスを線形に向上できます。 -[Original article](https://clickhouse.tech/docs/ja/introduction/performance/) +[Original article](https://clickhouse.com/docs/ja/introduction/performance/) diff --git a/docs/ja/operations/access-rights.md b/docs/ja/operations/access-rights.md index c3fea6bfe5c..9b11d95033e 100644 --- a/docs/ja/operations/access-rights.md +++ b/docs/ja/operations/access-rights.md @@ -141,4 +141,4 @@ Roleは、ユーザーアカウントに付与できるaccessエンティティ デフォルトのSQL型のアクセス制御及び特別口座の口座管理オのすべてのユーザー ユーザーを設定する必要があります。 `users.xml` に1を割り当てます。 [access_management](settings/settings-users.md#access_management-user-setting) 設定。 -[元の記事](https://clickhouse.tech/docs/en/operations/access_rights/) +[元の記事](https://clickhouse.com/docs/en/operations/access_rights/) diff --git a/docs/ja/operations/backup.md b/docs/ja/operations/backup.md index b0cde00e23c..208c535eb57 100644 --- a/docs/ja/operations/backup.md +++ b/docs/ja/operations/backup.md @@ -38,4 +38,4 @@ ClickHouseは、 `ALTER TABLE ... FREEZE PARTITION ...` クエリをコピーの 第三者ツールを自動化するこのアプローチ: [clickhouse-バックアップ](https://github.com/AlexAkulov/clickhouse-backup). -[元の記事](https://clickhouse.tech/docs/en/operations/backup/) +[元の記事](https://clickhouse.com/docs/en/operations/backup/) diff --git a/docs/ja/operations/caches.md b/docs/ja/operations/caches.md new file mode 120000 index 00000000000..ab229298e5f --- /dev/null +++ b/docs/ja/operations/caches.md @@ -0,0 +1 @@ +../../en/operations/caches.md \ No newline at end of file diff --git a/docs/ja/operations/clickhouse-keeper.md b/docs/ja/operations/clickhouse-keeper.md new file mode 120000 index 00000000000..528ba82fea4 --- /dev/null +++ b/docs/ja/operations/clickhouse-keeper.md @@ -0,0 +1 @@ +../../en/operations/clickhouse-keeper.md \ No newline at end of file diff --git a/docs/ja/operations/configuration-files.md b/docs/ja/operations/configuration-files.md index b269508f408..f170ceab907 100644 --- a/docs/ja/operations/configuration-files.md +++ b/docs/ja/operations/configuration-files.md @@ -20,7 +20,7 @@ ClickHouseは複数のファイル構成管理をサポートします。 主サ もし `remove` 指定されると、要素を削除します。 -この設定はまた、 “substitutions”. 要素が `incl` 属性は、ファイルからの対応する置換が値として使用されます。 デフォルトでは、ファイルへのパスとの置換を行う `/etc/metrika.xml`. これはで変えることができます [include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from) サーバー設定の要素。 置換値は、次のように指定されます `/yandex/substitution_name` このファイル内の要素。 で指定された置換の場合 `incl` 存在しない場合は、ログに記録されます。 ClickHouseが不足している置換をログに記録しないようにするには、 `optional="true"` 属性(たとえば、 [マクロ](server-configuration-parameters/settings.md)). +この設定はまた、 “substitutions”. 要素が `incl` 属性は、ファイルからの対応する置換が値として使用されます。 デフォルトでは、ファイルへのパスとの置換を行う `/etc/metrika.xml`. これはで変えることができます [include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from) サーバー設定の要素。 置換値は、次のように指定されます `/clickhouse/substitution_name` このファイル内の要素。 で指定された置換の場合 `incl` 存在しない場合は、ログに記録されます。 ClickHouseが不足している置換をログに記録しないようにするには、 `optional="true"` 属性(たとえば、 [マクロ](server-configuration-parameters/settings.md)). 置換はZooKeeperからも実行できます。 これを行うには、属性を指定します `from_zk = "/path/to/node"`. 要素の値は、ノードの内容に置き換えられます。 `/path/to/node` 飼育係で。 また、ZooKeeperノードにXMLサブツリー全体を配置することもできます。 @@ -54,4 +54,4 @@ $ cat /etc/clickhouse-server/users.d/alice.xml サーバーは、設定ファイルの変更、置換および上書きの実行時に使用されたファイルおよびZooKeeperノードを追跡し、ユーザーおよびクラスターの設定をその場で再ロード つまり、サーバーを再起動せずにクラスター、ユーザー、およびその設定を変更できます。 -[元の記事](https://clickhouse.tech/docs/en/operations/configuration_files/) +[元の記事](https://clickhouse.com/docs/en/operations/configuration_files/) diff --git a/docs/ja/operations/external-authenticators/index.md b/docs/ja/operations/external-authenticators/index.md new file mode 120000 index 00000000000..5f656246c9d --- /dev/null +++ b/docs/ja/operations/external-authenticators/index.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/index.md \ No newline at end of file diff --git a/docs/ja/operations/external-authenticators/kerberos.md b/docs/ja/operations/external-authenticators/kerberos.md new file mode 120000 index 00000000000..b5a4d557de4 --- /dev/null +++ b/docs/ja/operations/external-authenticators/kerberos.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/kerberos.md \ No newline at end of file diff --git a/docs/ja/operations/external-authenticators/ldap.md b/docs/ja/operations/external-authenticators/ldap.md new file mode 120000 index 00000000000..a171d0ac05a --- /dev/null +++ b/docs/ja/operations/external-authenticators/ldap.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/ldap.md \ No newline at end of file diff --git a/docs/ja/operations/index.md b/docs/ja/operations/index.md index 3fc7d869800..dcc5479bda8 100644 --- a/docs/ja/operations/index.md +++ b/docs/ja/operations/index.md @@ -25,4 +25,4 @@ ClickHouse操作マニュアルの以下の主要部: - [設定](settings/index.md) - [ユーティリ](utilities/index.md) -{## [元の記事](https://clickhouse.tech/docs/en/operations/) ##} +{## [元の記事](https://clickhouse.com/docs/en/operations/) ##} diff --git a/docs/ja/operations/opentelemetry.md b/docs/ja/operations/opentelemetry.md new file mode 120000 index 00000000000..a4d96e36a4e --- /dev/null +++ b/docs/ja/operations/opentelemetry.md @@ -0,0 +1 @@ +../../en/operations/opentelemetry.md \ No newline at end of file diff --git a/docs/ja/operations/performance-test.md b/docs/ja/operations/performance-test.md index a60a8872a16..068eb4fbc04 100644 --- a/docs/ja/operations/performance-test.md +++ b/docs/ja/operations/performance-test.md @@ -48,7 +48,7 @@ toc_title: "\u30CF\u30FC\u30C9\u30A6\u30A7\u30A2\u8A66\u9A13" - wget https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz + wget https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz tar xvf hits_100m_obfuscated_v1.tar.xz -C . mv hits_100m_obfuscated_v1/* . diff --git a/docs/ja/operations/quotas.md b/docs/ja/operations/quotas.md index bca708cd041..2de45397350 100644 --- a/docs/ja/operations/quotas.md +++ b/docs/ja/operations/quotas.md @@ -109,4 +109,4 @@ toc_title: "\u30AF\u30A9\u30FC\u30BF" サーバーを再起動すると、クォータがリセットされます。 -[元の記事](https://clickhouse.tech/docs/en/operations/quotas/) +[元の記事](https://clickhouse.com/docs/en/operations/quotas/) diff --git a/docs/ja/operations/server-configuration-parameters/index.md b/docs/ja/operations/server-configuration-parameters/index.md index f8e63412a1c..77f406482e8 100644 --- a/docs/ja/operations/server-configuration-parameters/index.md +++ b/docs/ja/operations/server-configuration-parameters/index.md @@ -16,4 +16,4 @@ toc_title: "\u306F\u3058\u3081\u306B" 設定を勉強する前に、 [設定ファイル](../configuration-files.md#configuration_files) セクションと置換の使用に注意してください( `incl` と `optional` 属性)。 -[元の記事](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/) +[元の記事](https://clickhouse.com/docs/en/operations/server_configuration_parameters/) diff --git a/docs/ja/operations/server-configuration-parameters/settings.md b/docs/ja/operations/server-configuration-parameters/settings.md index f544a92e377..7e0d5ebcc22 100644 --- a/docs/ja/operations/server-configuration-parameters/settings.md +++ b/docs/ja/operations/server-configuration-parameters/settings.md @@ -284,12 +284,12 @@ ClickHouseサーバー間でデータを交換するポート。 ## keep_alive_timeout {#keep-alive-timeout} -ClickHouseが接続を閉じる前に受信要求を待機する秒数。 既定値は3秒です。 +ClickHouseが接続を閉じる前に受信要求を待機する秒数。 既定値は10秒です。 **例** ``` xml -3 +10 ``` ## listen_host {#server_configuration_parameters-listen_host} @@ -903,4 +903,4 @@ ClickHouse内部DNSキャッシュに格納されているIPアドレスの更 - [アクセス制御とアカウント管理](../access-rights.md#access-control) -[元の記事](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/settings/) +[元の記事](https://clickhouse.com/docs/en/operations/server_configuration_parameters/settings/) diff --git a/docs/ja/operations/settings/constraints-on-settings.md b/docs/ja/operations/settings/constraints-on-settings.md index da7371564b4..4c73fdb3667 100644 --- a/docs/ja/operations/settings/constraints-on-settings.md +++ b/docs/ja/operations/settings/constraints-on-settings.md @@ -72,4 +72,4 @@ Code: 452, e.displayText() = DB::Exception: Setting force_index_by_date should n **注:** その `default` プロファイルには特別な処理があります。 `default` プロのデフォルトの制約、その制限するすべてのユーザーまでの彼らのメソッドを明示的にこれらのユーザー -[元の記事](https://clickhouse.tech/docs/en/operations/settings/constraints_on_settings/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/constraints_on_settings/) diff --git a/docs/ja/operations/settings/index.md b/docs/ja/operations/settings/index.md index f64c339ef9e..da8343484d2 100644 --- a/docs/ja/operations/settings/index.md +++ b/docs/ja/operations/settings/index.md @@ -30,4 +30,4 @@ toc_title: "\u306F\u3058\u3081\u306B" サーバー設定ファイルでのみ行うことができる設定は、このセクションでは説明しません。 -[元の記事](https://clickhouse.tech/docs/en/operations/settings/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/) diff --git a/docs/ja/operations/settings/merge-tree-settings.md b/docs/ja/operations/settings/merge-tree-settings.md new file mode 120000 index 00000000000..51825e80601 --- /dev/null +++ b/docs/ja/operations/settings/merge-tree-settings.md @@ -0,0 +1 @@ +../../../en/operations/settings/merge-tree-settings.md \ No newline at end of file diff --git a/docs/ja/operations/settings/permissions-for-queries.md b/docs/ja/operations/settings/permissions-for-queries.md index d77bed96464..48bd2d06506 100644 --- a/docs/ja/operations/settings/permissions-for-queries.md +++ b/docs/ja/operations/settings/permissions-for-queries.md @@ -58,4 +58,4 @@ toc_title: "\u30AF\u30A8\u30EA\u306E\u6A29\u9650" デフォルト値:1 -[元の記事](https://clickhouse.tech/docs/en/operations/settings/permissions_for_queries/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/permissions_for_queries/) diff --git a/docs/ja/operations/settings/query-complexity.md b/docs/ja/operations/settings/query-complexity.md index f98e55ef572..d893bd7ee60 100644 --- a/docs/ja/operations/settings/query-complexity.md +++ b/docs/ja/operations/settings/query-complexity.md @@ -298,4 +298,4 @@ ClickHouseは、制限に達したときにさまざまなアクションを続 > “Too many partitions for single INSERT block (more than” +toString(max_parts)+ “). The limit is controlled by ‘max_partitions_per_insert_block’ setting. A large number of partitions is a common misconception. It will lead to severe negative performance impact, including slow server startup, slow INSERT queries and slow SELECT queries. Recommended total number of partitions for a table is under 1000..10000. Please note, that partitioning is not intended to speed up SELECT queries (ORDER BY key is sufficient to make range queries fast). Partitions are intended for data manipulation (DROP PARTITION, etc).” -[元の記事](https://clickhouse.tech/docs/en/operations/settings/query_complexity/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/query_complexity/) diff --git a/docs/ja/operations/settings/settings-profiles.md b/docs/ja/operations/settings/settings-profiles.md index 09f10a231cf..dfbb4f1df85 100644 --- a/docs/ja/operations/settings/settings-profiles.md +++ b/docs/ja/operations/settings/settings-profiles.md @@ -78,4 +78,4 @@ SET profile = 'web' その `web` プロファイルは通常のプロファイルです。 `SET` クエリまたはHTTPクエリでURLパラメータを使用する。 -[元の記事](https://clickhouse.tech/docs/en/operations/settings/settings_profiles/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/settings_profiles/) diff --git a/docs/ja/operations/settings/settings-users.md b/docs/ja/operations/settings/settings-users.md index dc72c6ceb6f..65545790614 100644 --- a/docs/ja/operations/settings/settings-users.md +++ b/docs/ja/operations/settings/settings-users.md @@ -161,4 +161,4 @@ toc_title: "\u30E6\u30FC\u30B6\u30FC\u8A2D\u5B9A" その `filter` 任意の式にすることができます。 [UInt8](../../sql-reference/data-types/int-uint.md)-タイプ値。 通常、比較演算子と論理演算子が含まれています。 からの行 `database_name.table1` る結果をフィルターを0においても返却いたしませんこのユーザーです。 このフィルタリングは `PREWHERE` 操作と無効 `WHERE→PREWHERE` 最適化。 -[元の記事](https://clickhouse.tech/docs/en/operations/settings/settings_users/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/settings_users/) diff --git a/docs/ja/operations/settings/settings.md b/docs/ja/operations/settings/settings.md index 8ba30f318ab..91c442d3165 100644 --- a/docs/ja/operations/settings/settings.md +++ b/docs/ja/operations/settings/settings.md @@ -1235,4 +1235,4 @@ PREWHERE/WHEREにシャーディングキー条件があるSELECTクエリの未 デフォルト値は16です。 -[元の記事](https://clickhouse.tech/docs/en/operations/settings/settings/) +[元の記事](https://clickhouse.com/docs/en/operations/settings/settings/) diff --git a/docs/ja/operations/storing-data.md b/docs/ja/operations/storing-data.md new file mode 120000 index 00000000000..16722fb5a39 --- /dev/null +++ b/docs/ja/operations/storing-data.md @@ -0,0 +1 @@ +../../en/operations/storing-data.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables.md b/docs/ja/operations/system-tables.md index be0c3356247..4a18028c084 100644 --- a/docs/ja/operations/system-tables.md +++ b/docs/ja/operations/system-tables.md @@ -1162,4 +1162,4 @@ path: /clickhouse/tables/01-08/visits/replicas ストレージポリシーに複数のボリュームが含まれている場合は、各ボリュームの情報がテーブルの個々の行に格納されます。 -[元の記事](https://clickhouse.tech/docs/en/operations/system_tables/) +[元の記事](https://clickhouse.com/docs/en/operations/system_tables/) diff --git a/docs/ja/operations/system-tables/asynchronous_metric_log.md b/docs/ja/operations/system-tables/asynchronous_metric_log.md new file mode 120000 index 00000000000..8ffe4dca1ba --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_metric_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/asynchronous_metric_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/asynchronous_metrics.md b/docs/ja/operations/system-tables/asynchronous_metrics.md new file mode 120000 index 00000000000..fcaf428f59c --- /dev/null +++ b/docs/ja/operations/system-tables/asynchronous_metrics.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/asynchronous_metrics.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/clusters.md b/docs/ja/operations/system-tables/clusters.md new file mode 120000 index 00000000000..41c8a05c3b8 --- /dev/null +++ b/docs/ja/operations/system-tables/clusters.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/clusters.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/columns.md b/docs/ja/operations/system-tables/columns.md new file mode 120000 index 00000000000..ff7fb750f7e --- /dev/null +++ b/docs/ja/operations/system-tables/columns.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/columns.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/contributors.md b/docs/ja/operations/system-tables/contributors.md new file mode 120000 index 00000000000..2eb2c01f5a1 --- /dev/null +++ b/docs/ja/operations/system-tables/contributors.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/contributors.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/crash-log.md b/docs/ja/operations/system-tables/crash-log.md new file mode 120000 index 00000000000..d1aa67601bc --- /dev/null +++ b/docs/ja/operations/system-tables/crash-log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/crash-log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/current-roles.md b/docs/ja/operations/system-tables/current-roles.md new file mode 120000 index 00000000000..b9f1f9d6e9d --- /dev/null +++ b/docs/ja/operations/system-tables/current-roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/current-roles.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/data_skipping_indices.md b/docs/ja/operations/system-tables/data_skipping_indices.md new file mode 120000 index 00000000000..2820987bf69 --- /dev/null +++ b/docs/ja/operations/system-tables/data_skipping_indices.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/data_skipping_indices.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/data_type_families.md b/docs/ja/operations/system-tables/data_type_families.md new file mode 120000 index 00000000000..6d47b6f3f20 --- /dev/null +++ b/docs/ja/operations/system-tables/data_type_families.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/data_type_families.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/databases.md b/docs/ja/operations/system-tables/databases.md new file mode 120000 index 00000000000..058c2f32350 --- /dev/null +++ b/docs/ja/operations/system-tables/databases.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/databases.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/detached_parts.md b/docs/ja/operations/system-tables/detached_parts.md new file mode 120000 index 00000000000..5199756766a --- /dev/null +++ b/docs/ja/operations/system-tables/detached_parts.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/detached_parts.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/dictionaries.md b/docs/ja/operations/system-tables/dictionaries.md new file mode 120000 index 00000000000..6c7d41422da --- /dev/null +++ b/docs/ja/operations/system-tables/dictionaries.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/dictionaries.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/disks.md b/docs/ja/operations/system-tables/disks.md new file mode 120000 index 00000000000..faace23e9d7 --- /dev/null +++ b/docs/ja/operations/system-tables/disks.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/disks.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/distributed_ddl_queue.md b/docs/ja/operations/system-tables/distributed_ddl_queue.md new file mode 120000 index 00000000000..a9cadc74af2 --- /dev/null +++ b/docs/ja/operations/system-tables/distributed_ddl_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/distributed_ddl_queue.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/distribution_queue.md b/docs/ja/operations/system-tables/distribution_queue.md new file mode 120000 index 00000000000..3831b85000c --- /dev/null +++ b/docs/ja/operations/system-tables/distribution_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/distribution_queue.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/enabled-roles.md b/docs/ja/operations/system-tables/enabled-roles.md new file mode 120000 index 00000000000..04ffee25343 --- /dev/null +++ b/docs/ja/operations/system-tables/enabled-roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/enabled-roles.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/errors.md b/docs/ja/operations/system-tables/errors.md new file mode 120000 index 00000000000..2bb8c1dff0d --- /dev/null +++ b/docs/ja/operations/system-tables/errors.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/errors.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/events.md b/docs/ja/operations/system-tables/events.md new file mode 120000 index 00000000000..b9eb57426f2 --- /dev/null +++ b/docs/ja/operations/system-tables/events.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/events.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/functions.md b/docs/ja/operations/system-tables/functions.md new file mode 120000 index 00000000000..7a0f2d1853f --- /dev/null +++ b/docs/ja/operations/system-tables/functions.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/functions.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/grants.md b/docs/ja/operations/system-tables/grants.md new file mode 120000 index 00000000000..ec7f50b118e --- /dev/null +++ b/docs/ja/operations/system-tables/grants.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/grants.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/graphite_retentions.md b/docs/ja/operations/system-tables/graphite_retentions.md new file mode 120000 index 00000000000..b8c049625ac --- /dev/null +++ b/docs/ja/operations/system-tables/graphite_retentions.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/graphite_retentions.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/index.md b/docs/ja/operations/system-tables/index.md new file mode 120000 index 00000000000..77d10f24c7f --- /dev/null +++ b/docs/ja/operations/system-tables/index.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/index.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/licenses.md b/docs/ja/operations/system-tables/licenses.md new file mode 120000 index 00000000000..a84b4bbf3e3 --- /dev/null +++ b/docs/ja/operations/system-tables/licenses.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/licenses.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/merge_tree_settings.md b/docs/ja/operations/system-tables/merge_tree_settings.md new file mode 120000 index 00000000000..dbff2462867 --- /dev/null +++ b/docs/ja/operations/system-tables/merge_tree_settings.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/merge_tree_settings.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/merges.md b/docs/ja/operations/system-tables/merges.md new file mode 120000 index 00000000000..21406d070e7 --- /dev/null +++ b/docs/ja/operations/system-tables/merges.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/merges.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/metric_log.md b/docs/ja/operations/system-tables/metric_log.md new file mode 120000 index 00000000000..57c04f0fd54 --- /dev/null +++ b/docs/ja/operations/system-tables/metric_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/metric_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/metrics.md b/docs/ja/operations/system-tables/metrics.md new file mode 120000 index 00000000000..06359d159b2 --- /dev/null +++ b/docs/ja/operations/system-tables/metrics.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/metrics.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/mutations.md b/docs/ja/operations/system-tables/mutations.md new file mode 120000 index 00000000000..598f05d4381 --- /dev/null +++ b/docs/ja/operations/system-tables/mutations.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/mutations.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/numbers.md b/docs/ja/operations/system-tables/numbers.md new file mode 120000 index 00000000000..29fce9b3569 --- /dev/null +++ b/docs/ja/operations/system-tables/numbers.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/numbers.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/numbers_mt.md b/docs/ja/operations/system-tables/numbers_mt.md new file mode 120000 index 00000000000..7547a8e014c --- /dev/null +++ b/docs/ja/operations/system-tables/numbers_mt.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/numbers_mt.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/one.md b/docs/ja/operations/system-tables/one.md new file mode 120000 index 00000000000..ad50d714928 --- /dev/null +++ b/docs/ja/operations/system-tables/one.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/one.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/opentelemetry_span_log.md b/docs/ja/operations/system-tables/opentelemetry_span_log.md new file mode 120000 index 00000000000..59aab8cd11d --- /dev/null +++ b/docs/ja/operations/system-tables/opentelemetry_span_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/opentelemetry_span_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/part_log.md b/docs/ja/operations/system-tables/part_log.md new file mode 120000 index 00000000000..274900a57ad --- /dev/null +++ b/docs/ja/operations/system-tables/part_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/part_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/parts.md b/docs/ja/operations/system-tables/parts.md new file mode 120000 index 00000000000..900bb5240a0 --- /dev/null +++ b/docs/ja/operations/system-tables/parts.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/parts.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/parts_columns.md b/docs/ja/operations/system-tables/parts_columns.md new file mode 120000 index 00000000000..f2c7d4dde34 --- /dev/null +++ b/docs/ja/operations/system-tables/parts_columns.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/parts_columns.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/processes.md b/docs/ja/operations/system-tables/processes.md new file mode 120000 index 00000000000..b565db02713 --- /dev/null +++ b/docs/ja/operations/system-tables/processes.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/processes.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/query_log.md b/docs/ja/operations/system-tables/query_log.md new file mode 120000 index 00000000000..df9c4d8ba58 --- /dev/null +++ b/docs/ja/operations/system-tables/query_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/query_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/query_thread_log.md b/docs/ja/operations/system-tables/query_thread_log.md new file mode 120000 index 00000000000..98be3538c4c --- /dev/null +++ b/docs/ja/operations/system-tables/query_thread_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/query_thread_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/query_views_log.md b/docs/ja/operations/system-tables/query_views_log.md new file mode 120000 index 00000000000..f606e4108ca --- /dev/null +++ b/docs/ja/operations/system-tables/query_views_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/query_views_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/quota_limits.md b/docs/ja/operations/system-tables/quota_limits.md new file mode 120000 index 00000000000..3fecf881c92 --- /dev/null +++ b/docs/ja/operations/system-tables/quota_limits.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quota_limits.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/quota_usage.md b/docs/ja/operations/system-tables/quota_usage.md new file mode 120000 index 00000000000..c79f1a75033 --- /dev/null +++ b/docs/ja/operations/system-tables/quota_usage.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quota_usage.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/quotas.md b/docs/ja/operations/system-tables/quotas.md new file mode 120000 index 00000000000..b6a26bf77f3 --- /dev/null +++ b/docs/ja/operations/system-tables/quotas.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quotas.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/quotas_usage.md b/docs/ja/operations/system-tables/quotas_usage.md new file mode 120000 index 00000000000..ba204a4d9c0 --- /dev/null +++ b/docs/ja/operations/system-tables/quotas_usage.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quotas_usage.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/replicas.md b/docs/ja/operations/system-tables/replicas.md new file mode 120000 index 00000000000..dd231c5c80d --- /dev/null +++ b/docs/ja/operations/system-tables/replicas.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/replicas.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/replicated_fetches.md b/docs/ja/operations/system-tables/replicated_fetches.md new file mode 120000 index 00000000000..bf4547ebd07 --- /dev/null +++ b/docs/ja/operations/system-tables/replicated_fetches.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/replicated_fetches.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/replication_queue.md b/docs/ja/operations/system-tables/replication_queue.md new file mode 120000 index 00000000000..cdc452594e6 --- /dev/null +++ b/docs/ja/operations/system-tables/replication_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/replication_queue.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/role-grants.md b/docs/ja/operations/system-tables/role-grants.md new file mode 120000 index 00000000000..6a25ffa31ce --- /dev/null +++ b/docs/ja/operations/system-tables/role-grants.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/role-grants.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/roles.md b/docs/ja/operations/system-tables/roles.md new file mode 120000 index 00000000000..391bc980a48 --- /dev/null +++ b/docs/ja/operations/system-tables/roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/roles.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/row_policies.md b/docs/ja/operations/system-tables/row_policies.md new file mode 120000 index 00000000000..b194161cf1d --- /dev/null +++ b/docs/ja/operations/system-tables/row_policies.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/row_policies.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/settings.md b/docs/ja/operations/system-tables/settings.md new file mode 120000 index 00000000000..69b03c2312c --- /dev/null +++ b/docs/ja/operations/system-tables/settings.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/settings.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/settings_profile_elements.md b/docs/ja/operations/system-tables/settings_profile_elements.md new file mode 120000 index 00000000000..3b0e70ead49 --- /dev/null +++ b/docs/ja/operations/system-tables/settings_profile_elements.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/settings_profile_elements.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/settings_profiles.md b/docs/ja/operations/system-tables/settings_profiles.md new file mode 120000 index 00000000000..1c559bf2445 --- /dev/null +++ b/docs/ja/operations/system-tables/settings_profiles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/settings_profiles.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/stack_trace.md b/docs/ja/operations/system-tables/stack_trace.md new file mode 120000 index 00000000000..8dea20028f1 --- /dev/null +++ b/docs/ja/operations/system-tables/stack_trace.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/stack_trace.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/storage_policies.md b/docs/ja/operations/system-tables/storage_policies.md new file mode 120000 index 00000000000..b225b8d7cf6 --- /dev/null +++ b/docs/ja/operations/system-tables/storage_policies.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/storage_policies.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/table_engines.md b/docs/ja/operations/system-tables/table_engines.md new file mode 120000 index 00000000000..4bdfb34cb7e --- /dev/null +++ b/docs/ja/operations/system-tables/table_engines.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/table_engines.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/tables.md b/docs/ja/operations/system-tables/tables.md new file mode 120000 index 00000000000..6b2ae90a766 --- /dev/null +++ b/docs/ja/operations/system-tables/tables.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/tables.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/text_log.md b/docs/ja/operations/system-tables/text_log.md new file mode 120000 index 00000000000..0419e4c2080 --- /dev/null +++ b/docs/ja/operations/system-tables/text_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/text_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/time_zones.md b/docs/ja/operations/system-tables/time_zones.md new file mode 120000 index 00000000000..d7b0f07d326 --- /dev/null +++ b/docs/ja/operations/system-tables/time_zones.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/time_zones.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/trace_log.md b/docs/ja/operations/system-tables/trace_log.md new file mode 120000 index 00000000000..f092330b46a --- /dev/null +++ b/docs/ja/operations/system-tables/trace_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/trace_log.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/users.md b/docs/ja/operations/system-tables/users.md new file mode 120000 index 00000000000..540c5ac6620 --- /dev/null +++ b/docs/ja/operations/system-tables/users.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/users.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/zookeeper.md b/docs/ja/operations/system-tables/zookeeper.md new file mode 120000 index 00000000000..3e761b0e676 --- /dev/null +++ b/docs/ja/operations/system-tables/zookeeper.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/zookeeper.md \ No newline at end of file diff --git a/docs/ja/operations/system-tables/zookeeper_log.md b/docs/ja/operations/system-tables/zookeeper_log.md new file mode 120000 index 00000000000..c7db82e978a --- /dev/null +++ b/docs/ja/operations/system-tables/zookeeper_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/zookeeper_log.md \ No newline at end of file diff --git a/docs/ja/operations/tips.md b/docs/ja/operations/tips.md index 5c64a216e1d..1967654af79 100644 --- a/docs/ja/operations/tips.md +++ b/docs/ja/operations/tips.md @@ -248,4 +248,4 @@ script end script ``` -{## [元の記事](https://clickhouse.tech/docs/en/operations/tips/) ##} +{## [元の記事](https://clickhouse.com/docs/en/operations/tips/) ##} diff --git a/docs/ja/operations/utilities/clickhouse-compressor.md b/docs/ja/operations/utilities/clickhouse-compressor.md new file mode 120000 index 00000000000..98b1d8c4c7c --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-compressor.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-compressor.md \ No newline at end of file diff --git a/docs/ja/operations/utilities/clickhouse-copier.md b/docs/ja/operations/utilities/clickhouse-copier.md index 43e96647775..4d825f02b76 100644 --- a/docs/ja/operations/utilities/clickhouse-copier.md +++ b/docs/ja/operations/utilities/clickhouse-copier.md @@ -173,4 +173,4 @@ $ clickhouse-copier copier --daemon --config zookeeper.xml --task-path /task/pat `clickhouse-copier` の変更を追跡します `/task/path/description` そしてその場でそれらを適用します。 たとえば、次の値を変更すると `max_workers`、タスクを実行しているプロセスの数も変更されます。 -[元の記事](https://clickhouse.tech/docs/en/operations/utils/clickhouse-copier/) +[元の記事](https://clickhouse.com/docs/en/operations/utils/clickhouse-copier/) diff --git a/docs/ja/operations/utilities/clickhouse-format.md b/docs/ja/operations/utilities/clickhouse-format.md new file mode 120000 index 00000000000..d71a78cd40b --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-format.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-format.md \ No newline at end of file diff --git a/docs/ja/operations/utilities/clickhouse-local.md b/docs/ja/operations/utilities/clickhouse-local.md index 5f665bde19f..25714aec8d9 100644 --- a/docs/ja/operations/utilities/clickhouse-local.md +++ b/docs/ja/operations/utilities/clickhouse-local.md @@ -78,4 +78,4 @@ Read 186 rows, 4.15 KiB in 0.035 sec., 5302 rows/sec., 118.34 KiB/sec. ... ``` -[元の記事](https://clickhouse.tech/docs/en/operations/utils/clickhouse-local/) +[元の記事](https://clickhouse.com/docs/en/operations/utils/clickhouse-local/) diff --git a/docs/ja/operations/utilities/clickhouse-obfuscator.md b/docs/ja/operations/utilities/clickhouse-obfuscator.md new file mode 120000 index 00000000000..06d1df70693 --- /dev/null +++ b/docs/ja/operations/utilities/clickhouse-obfuscator.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-obfuscator.md \ No newline at end of file diff --git a/docs/ja/operations/utilities/index.md b/docs/ja/operations/utilities/index.md index 8dd37072b50..99d168fe670 100644 --- a/docs/ja/operations/utilities/index.md +++ b/docs/ja/operations/utilities/index.md @@ -12,4 +12,4 @@ toc_title: "\u6982\u8981" - [クリックハウス-複写機](clickhouse-copier.md) — Copies (and reshards) data from one cluster to another cluster. - [clickhouse-ベンチマーク](clickhouse-benchmark.md) — Loads server with the custom queries and settings. -[元の記事](https://clickhouse.tech/docs/en/operations/utils/) +[元の記事](https://clickhouse.com/docs/en/operations/utils/) diff --git a/docs/ja/operations/utilities/odbc-bridge.md b/docs/ja/operations/utilities/odbc-bridge.md new file mode 120000 index 00000000000..c5772389199 --- /dev/null +++ b/docs/ja/operations/utilities/odbc-bridge.md @@ -0,0 +1 @@ +../../../en/operations/utilities/odbc-bridge.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/combinators.md b/docs/ja/sql-reference/aggregate-functions/combinators.md index c5121f5259a..f44bf4f6e7e 100644 --- a/docs/ja/sql-reference/aggregate-functions/combinators.md +++ b/docs/ja/sql-reference/aggregate-functions/combinators.md @@ -242,4 +242,4 @@ FROM people └────────┴───────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/agg_functions/combinators/) +[元の記事](https://clickhouse.com/docs/en/query_language/agg_functions/combinators/) diff --git a/docs/ja/sql-reference/aggregate-functions/index.md b/docs/ja/sql-reference/aggregate-functions/index.md index bf1e47103ba..3f40eeb7221 100644 --- a/docs/ja/sql-reference/aggregate-functions/index.md +++ b/docs/ja/sql-reference/aggregate-functions/index.md @@ -59,4 +59,4 @@ SELECT groupArray(y) FROM t_null_big `groupArray` 含まない `NULL` 結果の配列で。 -[元の記事](https://clickhouse.tech/docs/en/query_language/agg_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/agg_functions/) diff --git a/docs/ja/sql-reference/aggregate-functions/parametric-functions.md b/docs/ja/sql-reference/aggregate-functions/parametric-functions.md index 9eba5baf8a7..82396f9bf95 100644 --- a/docs/ja/sql-reference/aggregate-functions/parametric-functions.md +++ b/docs/ja/sql-reference/aggregate-functions/parametric-functions.md @@ -492,7 +492,7 @@ Problem: Generate a report that shows only keywords that produced at least 5 uni Solution: Write in the GROUP BY query SearchPhrase HAVING uniqUpTo(4)(UserID) >= 5 ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/agg_functions/parametric_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/agg_functions/parametric_functions/) ## sumMapFiltered(keys_to_keep)(キー,値) {#summapfilteredkeys-to-keepkeys-values} diff --git a/docs/ja/sql-reference/aggregate-functions/reference.md b/docs/ja/sql-reference/aggregate-functions/reference.md index c66e9b54746..636992e19a8 100644 --- a/docs/ja/sql-reference/aggregate-functions/reference.md +++ b/docs/ja/sql-reference/aggregate-functions/reference.md @@ -1911,4 +1911,4 @@ SELECT arraySort(bitmapToArray(groupBitmapXorState(z))) FROM bitmap_column_expr_ └──────────────────────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/agg_functions/reference/) +[元の記事](https://clickhouse.com/docs/en/query_language/agg_functions/reference/) diff --git a/docs/ja/sql-reference/aggregate-functions/reference/any.md b/docs/ja/sql-reference/aggregate-functions/reference/any.md new file mode 120000 index 00000000000..1a180fae79b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/any.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/any.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md b/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md new file mode 120000 index 00000000000..3dd65a5a6ac --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/anyheavy.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/anyheavy.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/anylast.md b/docs/ja/sql-reference/aggregate-functions/reference/anylast.md new file mode 120000 index 00000000000..d2f88acf37d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/anylast.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/anylast.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/argmax.md b/docs/ja/sql-reference/aggregate-functions/reference/argmax.md new file mode 120000 index 00000000000..9260aa64e32 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/argmax.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/argmax.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/argmin.md b/docs/ja/sql-reference/aggregate-functions/reference/argmin.md new file mode 120000 index 00000000000..cc04e48011a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/argmin.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/argmin.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/avg.md b/docs/ja/sql-reference/aggregate-functions/reference/avg.md new file mode 120000 index 00000000000..dce5db3d1f8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/avg.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/avg.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md new file mode 120000 index 00000000000..c7584607600 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/avgweighted.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/avgweighted.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md b/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md new file mode 120000 index 00000000000..22a84e3e5d2 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/corr.md b/docs/ja/sql-reference/aggregate-functions/reference/corr.md new file mode 120000 index 00000000000..582cc9c15cd --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/corr.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/corr.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/count.md b/docs/ja/sql-reference/aggregate-functions/reference/count.md new file mode 120000 index 00000000000..d17713f7fe6 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/count.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/count.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md b/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md new file mode 120000 index 00000000000..c31a289939b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarpop.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/covarpop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md new file mode 120000 index 00000000000..21282114272 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/covarsamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/covarsamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md b/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md new file mode 120000 index 00000000000..b9a8bdce6fe --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/deltasum.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/deltasum.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md b/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md new file mode 120000 index 00000000000..3720d4f7b98 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/deltasumtimestamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/deltasumtimestamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md new file mode 120000 index 00000000000..cbc4b5ed5b7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparray.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/grouparray.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md new file mode 120000 index 00000000000..9710872316e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparrayinsertat.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/grouparrayinsertat.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md new file mode 120000 index 00000000000..2e7abdd3184 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingavg.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/grouparraymovingavg.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md new file mode 120000 index 00000000000..5d5eb7e6884 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraymovingsum.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/grouparraymovingsum.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md new file mode 120000 index 00000000000..797f57e7457 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/grouparraysample.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/grouparraysample.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md new file mode 120000 index 00000000000..464b68b114d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitand.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitand.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md new file mode 120000 index 00000000000..04386983f6c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmap.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmap.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md new file mode 120000 index 00000000000..861ac2c3dd3 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapand.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapand.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md new file mode 120000 index 00000000000..0fcb851d0a4 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapor.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md new file mode 120000 index 00000000000..13c79b37200 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitmapxor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapxor.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md new file mode 120000 index 00000000000..06664ee3fdb --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitor.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md b/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md new file mode 120000 index 00000000000..d98130b4b30 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupbitxor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitxor.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md b/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md new file mode 120000 index 00000000000..f739df80064 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/groupuniqarray.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupuniqarray.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/index.md b/docs/ja/sql-reference/aggregate-functions/reference/index.md new file mode 120000 index 00000000000..bde1a622626 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/index.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/index.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md b/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md new file mode 120000 index 00000000000..b69019d0cf2 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/intervalLengthSum.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/intervalLengthSum.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md b/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md new file mode 120000 index 00000000000..ee8f9be79fd --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/kurtpop.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/kurtpop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md new file mode 120000 index 00000000000..dbc05efec9e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/kurtsamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/kurtsamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md b/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md new file mode 120000 index 00000000000..7cbd9ceb1be --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/mannwhitneyutest.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/mannwhitneyutest.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/max.md b/docs/ja/sql-reference/aggregate-functions/reference/max.md new file mode 120000 index 00000000000..ae47679c80e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/max.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/max.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md b/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md new file mode 120000 index 00000000000..ffd64c34667 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/maxmap.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/maxmap.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/median.md b/docs/ja/sql-reference/aggregate-functions/reference/median.md new file mode 120000 index 00000000000..d05756b8978 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/median.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/median.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/min.md b/docs/ja/sql-reference/aggregate-functions/reference/min.md new file mode 120000 index 00000000000..61417b347a8 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/min.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/min.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/minmap.md b/docs/ja/sql-reference/aggregate-functions/reference/minmap.md new file mode 120000 index 00000000000..bf075897bd9 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/minmap.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/minmap.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantile.md b/docs/ja/sql-reference/aggregate-functions/reference/quantile.md new file mode 120000 index 00000000000..12d80246267 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantile.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantile.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md b/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md new file mode 120000 index 00000000000..dd4fd12eb40 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantilebfloat16.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantilebfloat16.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md new file mode 120000 index 00000000000..60be9721f31 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiledeterministic.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiledeterministic.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md new file mode 120000 index 00000000000..06fe3567621 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileexact.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantileexact.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md new file mode 120000 index 00000000000..f5dd2a23c1c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantileexactweighted.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantileexactweighted.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md new file mode 120000 index 00000000000..67e5037b8fa --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiles.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiles.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md new file mode 120000 index 00000000000..360c513eca1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigest.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiletdigest.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md new file mode 120000 index 00000000000..a130216554f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiletdigestweighted.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md new file mode 120000 index 00000000000..eda78f3382a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletiming.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiletiming.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md new file mode 120000 index 00000000000..b333a6726b1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/quantiletimingweighted.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantiletimingweighted.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md b/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md new file mode 120000 index 00000000000..d1809ad364d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/rankCorr.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/rankCorr.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md b/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md new file mode 120000 index 00000000000..8a07049140c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/simplelinearregression.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/simplelinearregression.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md b/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md new file mode 120000 index 00000000000..2ce2f5259d7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/skewpop.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/skewpop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md new file mode 120000 index 00000000000..3d2f39e8063 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/skewsamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/skewsamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md new file mode 120000 index 00000000000..e6f6719f3cf --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevpop.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/stddevpop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md new file mode 120000 index 00000000000..55d8a4ea6db --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stddevsamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/stddevsamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md new file mode 120000 index 00000000000..cfa196bc3f3 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlinearregression.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/stochasticlinearregression.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md new file mode 120000 index 00000000000..377807709d1 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/stochasticlogisticregression.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md b/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md new file mode 120000 index 00000000000..ef39bb83322 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/studentttest.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/studentttest.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sum.md b/docs/ja/sql-reference/aggregate-functions/reference/sum.md new file mode 120000 index 00000000000..d81cdf86f04 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sum.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sum.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md b/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md new file mode 120000 index 00000000000..9f0299a5fe7 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumcount.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sumcount.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md b/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md new file mode 120000 index 00000000000..650f8a34d9d --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumkahan.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sumkahan.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/summap.md b/docs/ja/sql-reference/aggregate-functions/reference/summap.md new file mode 120000 index 00000000000..acdb0c63e38 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/summap.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/summap.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md b/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md new file mode 120000 index 00000000000..7c9342b0e1e --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/sumwithoverflow.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sumwithoverflow.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/topk.md b/docs/ja/sql-reference/aggregate-functions/reference/topk.md new file mode 120000 index 00000000000..08da6abe743 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/topk.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/topk.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md b/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md new file mode 120000 index 00000000000..7d1ce22ed6a --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/topkweighted.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/topkweighted.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniq.md b/docs/ja/sql-reference/aggregate-functions/reference/uniq.md new file mode 120000 index 00000000000..e52d21ff731 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniq.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniq.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md new file mode 120000 index 00000000000..d8d59dfd8bb --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqcombined.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md new file mode 120000 index 00000000000..e1750183f01 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqcombined64.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqcombined64.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md new file mode 120000 index 00000000000..080ea046e2f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqexact.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqexact.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md new file mode 120000 index 00000000000..3aa80e68d6c --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqhll12.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqhll12.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md b/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md new file mode 120000 index 00000000000..ac61a28677f --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/uniqthetasketch.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqthetasketch.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varpop.md b/docs/ja/sql-reference/aggregate-functions/reference/varpop.md new file mode 120000 index 00000000000..52ba6246b3b --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varpop.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/varpop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md b/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md new file mode 120000 index 00000000000..f9cd855fea6 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/varsamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/varsamp.md \ No newline at end of file diff --git a/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md b/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md new file mode 120000 index 00000000000..b0c6ca1ad68 --- /dev/null +++ b/docs/ja/sql-reference/aggregate-functions/reference/welchttest.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/welchttest.md \ No newline at end of file diff --git a/docs/ja/sql-reference/data-types/aggregatefunction.md b/docs/ja/sql-reference/data-types/aggregatefunction.md index 45aea71a2a9..036988066a7 100644 --- a/docs/ja/sql-reference/data-types/aggregatefunction.md +++ b/docs/ja/sql-reference/data-types/aggregatefunction.md @@ -67,4 +67,4 @@ SELECT uniqMerge(state) FROM (SELECT uniqState(UserID) AS state FROM table GROUP 見る [AggregatingMergeTree](../../engines/table-engines/mergetree-family/aggregatingmergetree.md) エンジンの説明。 -[元の記事](https://clickhouse.tech/docs/en/data_types/nested_data_structures/aggregatefunction/) +[元の記事](https://clickhouse.com/docs/en/data_types/nested_data_structures/aggregatefunction/) diff --git a/docs/ja/sql-reference/data-types/array.md b/docs/ja/sql-reference/data-types/array.md index 93fbb057701..18d9b483d8f 100644 --- a/docs/ja/sql-reference/data-types/array.md +++ b/docs/ja/sql-reference/data-types/array.md @@ -74,4 +74,4 @@ Received exception from server (version 1.1.54388): Code: 386. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: There is no supertype for types UInt8, String because some of them are String/FixedString and some of them are not. ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/array/) +[元の記事](https://clickhouse.com/docs/en/data_types/array/) diff --git a/docs/ja/sql-reference/data-types/boolean.md b/docs/ja/sql-reference/data-types/boolean.md index bcf5aa0289c..075e5d2ec7a 100644 --- a/docs/ja/sql-reference/data-types/boolean.md +++ b/docs/ja/sql-reference/data-types/boolean.md @@ -9,4 +9,4 @@ toc_title: "\u30D6\u30FC\u30EB\u5024" ブール値には別の型はありません。 UInt8型を使用し、値0または1に制限します。 -[元の記事](https://clickhouse.tech/docs/en/data_types/boolean/) +[元の記事](https://clickhouse.com/docs/en/data_types/boolean/) diff --git a/docs/ja/sql-reference/data-types/date.md b/docs/ja/sql-reference/data-types/date.md index bcdc8f7224d..47b105627c2 100644 --- a/docs/ja/sql-reference/data-types/date.md +++ b/docs/ja/sql-reference/data-types/date.md @@ -9,4 +9,4 @@ toc_title: "\u65E5\u4ED8" 日付値は、タイムゾーンなしで格納されます。 -[元の記事](https://clickhouse.tech/docs/en/data_types/date/) +[元の記事](https://clickhouse.com/docs/en/data_types/date/) diff --git a/docs/ja/sql-reference/data-types/date32.md b/docs/ja/sql-reference/data-types/date32.md new file mode 120000 index 00000000000..2c8eca18107 --- /dev/null +++ b/docs/ja/sql-reference/data-types/date32.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/date32.md \ No newline at end of file diff --git a/docs/ja/sql-reference/data-types/datetime.md b/docs/ja/sql-reference/data-types/datetime.md index 8c6164881d8..50f06cee21c 100644 --- a/docs/ja/sql-reference/data-types/datetime.md +++ b/docs/ja/sql-reference/data-types/datetime.md @@ -126,4 +126,4 @@ FROM dt - [日付と時刻を操作する演算子](../../sql-reference/operators/index.md#operators-datetime) - [その `Date` データ型](date.md) -[元の記事](https://clickhouse.tech/docs/en/data_types/datetime/) +[元の記事](https://clickhouse.com/docs/en/data_types/datetime/) diff --git a/docs/ja/sql-reference/data-types/decimal.md b/docs/ja/sql-reference/data-types/decimal.md index 52fc336d331..e9c68f3c625 100644 --- a/docs/ja/sql-reference/data-types/decimal.md +++ b/docs/ja/sql-reference/data-types/decimal.md @@ -106,4 +106,4 @@ SELECT toDecimal32(1, 8) < 100 DB::Exception: Can't compare. ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/decimal/) +[元の記事](https://clickhouse.com/docs/en/data_types/decimal/) diff --git a/docs/ja/sql-reference/data-types/domains/index.md b/docs/ja/sql-reference/data-types/domains/index.md index 4f8c2b7add8..9a1688d94e6 100644 --- a/docs/ja/sql-reference/data-types/domains/index.md +++ b/docs/ja/sql-reference/data-types/domains/index.md @@ -30,4 +30,4 @@ toc_title: "\u6982\u8981" - 別の列または表からデータを挿入するときに、文字列値を暗黙的にドメイン値に変換できません。 - ドメインは、格納された値に制約を追加しません。 -[元の記事](https://clickhouse.tech/docs/en/data_types/domains/overview) +[元の記事](https://clickhouse.com/docs/en/data_types/domains/overview) diff --git a/docs/ja/sql-reference/data-types/domains/ipv4.md b/docs/ja/sql-reference/data-types/domains/ipv4.md index c329028ad40..fd1f3b84096 100644 --- a/docs/ja/sql-reference/data-types/domains/ipv4.md +++ b/docs/ja/sql-reference/data-types/domains/ipv4.md @@ -33,16 +33,16 @@ CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY from; `IPv4` ドメインはIPv4文字列としてカスタム入力形式をサポート: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.tech', '183.247.232.58')('https://clickhouse.tech/docs/en/', '116.106.34.242'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.com', '183.247.232.58')('https://clickhouse.com/docs/en/', '116.106.34.242'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬───────────from─┐ -│ https://clickhouse.tech/docs/en/ │ 116.106.34.242 │ +│ https://clickhouse.com/docs/en/ │ 116.106.34.242 │ │ https://wikipedia.org │ 116.253.40.133 │ -│ https://clickhouse.tech │ 183.247.232.58 │ +│ https://clickhouse.com │ 183.247.232.58 │ └────────────────────────────────────┴────────────────┘ ``` @@ -81,4 +81,4 @@ SELECT toTypeName(i), CAST(from as UInt32) as i FROM hits LIMIT 1; └──────────────────────────────────┴────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/domains/ipv4) +[元の記事](https://clickhouse.com/docs/en/data_types/domains/ipv4) diff --git a/docs/ja/sql-reference/data-types/domains/ipv6.md b/docs/ja/sql-reference/data-types/domains/ipv6.md index 26583429ec8..d0576341301 100644 --- a/docs/ja/sql-reference/data-types/domains/ipv6.md +++ b/docs/ja/sql-reference/data-types/domains/ipv6.md @@ -33,15 +33,15 @@ CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY from; `IPv6` ドメイ: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.tech', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.tech/docs/en/', '2a02:e980:1e::1'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.com', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.com/docs/en/', '2a02:e980:1e::1'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬─from──────────────────────────┐ -│ https://clickhouse.tech │ 2001:44c8:129:2632:33:0:252:2 │ -│ https://clickhouse.tech/docs/en/ │ 2a02:e980:1e::1 │ +│ https://clickhouse.com │ 2001:44c8:129:2632:33:0:252:2 │ +│ https://clickhouse.com/docs/en/ │ 2a02:e980:1e::1 │ │ https://wikipedia.org │ 2a02:aa08:e000:3100::2 │ └────────────────────────────────────┴───────────────────────────────┘ ``` @@ -83,4 +83,4 @@ SELECT toTypeName(i), CAST(from as FixedString(16)) as i FROM hits LIMIT 1; └───────────────────────────────────────────┴─────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/domains/ipv6) +[元の記事](https://clickhouse.com/docs/en/data_types/domains/ipv6) diff --git a/docs/ja/sql-reference/data-types/enum.md b/docs/ja/sql-reference/data-types/enum.md index aef4855ef06..e995d05febe 100644 --- a/docs/ja/sql-reference/data-types/enum.md +++ b/docs/ja/sql-reference/data-types/enum.md @@ -129,4 +129,4 @@ Most numeric and string operations are not defined for Enum values, e.g. adding ALTERを使用すると、Int8をInt16に変更するのと同じように、Enum8をEnum16に変更することも、その逆も可能です。 -[元の記事](https://clickhouse.tech/docs/en/data_types/enum/) +[元の記事](https://clickhouse.com/docs/en/data_types/enum/) diff --git a/docs/ja/sql-reference/data-types/fixedstring.md b/docs/ja/sql-reference/data-types/fixedstring.md index ef94410e285..3db284b3338 100644 --- a/docs/ja/sql-reference/data-types/fixedstring.md +++ b/docs/ja/sql-reference/data-types/fixedstring.md @@ -60,4 +60,4 @@ WHERE a = 'b\0' の長さに注意してください。 `FixedString(N)` 値は一定です。 その [長さ](../../sql-reference/functions/array-functions.md#array_functions-length) 関数の戻り値 `N` たとえ `FixedString(N)` 値はnullバイトのみで埋められますが、 [空](../../sql-reference/functions/string-functions.md#empty) 関数の戻り値 `1` この場合。 -[元の記事](https://clickhouse.tech/docs/en/data_types/fixedstring/) +[元の記事](https://clickhouse.com/docs/en/data_types/fixedstring/) diff --git a/docs/ja/sql-reference/data-types/float.md b/docs/ja/sql-reference/data-types/float.md index b9333ae297d..c1344edbc1c 100644 --- a/docs/ja/sql-reference/data-types/float.md +++ b/docs/ja/sql-reference/data-types/float.md @@ -84,4 +84,4 @@ SELECT 0 / 0 See the rules for `NaN` sorting in the section [ORDER BY clause](../sql_reference/statements/select/order-by.md). -[元の記事](https://clickhouse.tech/docs/en/data_types/float/) +[元の記事](https://clickhouse.com/docs/en/data_types/float/) diff --git a/docs/ja/sql-reference/data-types/geo.md b/docs/ja/sql-reference/data-types/geo.md new file mode 120000 index 00000000000..e25bc66b201 --- /dev/null +++ b/docs/ja/sql-reference/data-types/geo.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/geo.md \ No newline at end of file diff --git a/docs/ja/sql-reference/data-types/index.md b/docs/ja/sql-reference/data-types/index.md index 5f82d86ce46..0db65e66630 100644 --- a/docs/ja/sql-reference/data-types/index.md +++ b/docs/ja/sql-reference/data-types/index.md @@ -12,4 +12,4 @@ ClickHouseは、表のセルにさまざまな種類のデータを格納でき この章ではサポートされているデータの種類と特別な配慮のための利用および/または実施しています。 -[元の記事](https://clickhouse.tech/docs/en/data_types/) +[元の記事](https://clickhouse.com/docs/en/data_types/) diff --git a/docs/ja/sql-reference/data-types/int-uint.md b/docs/ja/sql-reference/data-types/int-uint.md index e6ac277b3b5..1248c2940b7 100644 --- a/docs/ja/sql-reference/data-types/int-uint.md +++ b/docs/ja/sql-reference/data-types/int-uint.md @@ -24,4 +24,4 @@ toc_title: "UInt8\u3001UInt16\u3001UInt32\u3001UInt64\u3001Int8\u3001Int16\u3001 - UInt32-\[0:4294967295\] - UInt64-\[0:18446744073709551615\] -[元の記事](https://clickhouse.tech/docs/en/data_types/int_uint/) +[元の記事](https://clickhouse.com/docs/en/data_types/int_uint/) diff --git a/docs/ja/sql-reference/data-types/map.md b/docs/ja/sql-reference/data-types/map.md new file mode 120000 index 00000000000..20de64e06d7 --- /dev/null +++ b/docs/ja/sql-reference/data-types/map.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/map.md \ No newline at end of file diff --git a/docs/ja/sql-reference/data-types/multiword-types.md b/docs/ja/sql-reference/data-types/multiword-types.md new file mode 120000 index 00000000000..aeb86eadd2b --- /dev/null +++ b/docs/ja/sql-reference/data-types/multiword-types.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/multiword-types.md \ No newline at end of file diff --git a/docs/ja/sql-reference/data-types/nested-data-structures/index.md b/docs/ja/sql-reference/data-types/nested-data-structures/index.md index d003868a135..c4b1f387bfe 100644 --- a/docs/ja/sql-reference/data-types/nested-data-structures/index.md +++ b/docs/ja/sql-reference/data-types/nested-data-structures/index.md @@ -9,4 +9,4 @@ toc_title: "\u96A0\u3057" # 入れ子データ構造 {#nested-data-structures} -[元の記事](https://clickhouse.tech/docs/en/data_types/nested_data_structures/) +[元の記事](https://clickhouse.com/docs/en/data_types/nested_data_structures/) diff --git a/docs/ja/sql-reference/data-types/nested-data-structures/nested.md b/docs/ja/sql-reference/data-types/nested-data-structures/nested.md index 68b6337a15e..2b1461d4e65 100644 --- a/docs/ja/sql-reference/data-types/nested-data-structures/nested.md +++ b/docs/ja/sql-reference/data-types/nested-data-structures/nested.md @@ -103,4 +103,4 @@ DESCRIBEクエリの場合、入れ子になったデータ構造の列は、同 入れ子になったデータ構造内の要素のALTERクエリには制限があります。 -[元の記事](https://clickhouse.tech/docs/en/data_types/nested_data_structures/nested/) +[元の記事](https://clickhouse.com/docs/en/data_types/nested_data_structures/nested/) diff --git a/docs/ja/sql-reference/data-types/nullable.md b/docs/ja/sql-reference/data-types/nullable.md index 5c6631aa99a..007e7ad1668 100644 --- a/docs/ja/sql-reference/data-types/nullable.md +++ b/docs/ja/sql-reference/data-types/nullable.md @@ -43,4 +43,4 @@ SELECT x + y FROM t_null └────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/nullable/) +[元の記事](https://clickhouse.com/docs/en/data_types/nullable/) diff --git a/docs/ja/sql-reference/data-types/simpleaggregatefunction.md b/docs/ja/sql-reference/data-types/simpleaggregatefunction.md index 9d28bcdb62c..f486feddb2b 100644 --- a/docs/ja/sql-reference/data-types/simpleaggregatefunction.md +++ b/docs/ja/sql-reference/data-types/simpleaggregatefunction.md @@ -37,4 +37,4 @@ CREATE TABLE t ) ENGINE = ... ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/simpleaggregatefunction/) +[元の記事](https://clickhouse.com/docs/en/data_types/simpleaggregatefunction/) diff --git a/docs/ja/sql-reference/data-types/special-data-types/expression.md b/docs/ja/sql-reference/data-types/special-data-types/expression.md index f777929abb6..f2f7f881ee1 100644 --- a/docs/ja/sql-reference/data-types/special-data-types/expression.md +++ b/docs/ja/sql-reference/data-types/special-data-types/expression.md @@ -9,4 +9,4 @@ toc_title: "\u5F0F" 式は、高次関数のラムダを表すために使用されます。 -[元の記事](https://clickhouse.tech/docs/en/data_types/special_data_types/expression/) +[元の記事](https://clickhouse.com/docs/en/data_types/special_data_types/expression/) diff --git a/docs/ja/sql-reference/data-types/special-data-types/index.md b/docs/ja/sql-reference/data-types/special-data-types/index.md index 4ad98970909..9ae66028cc1 100644 --- a/docs/ja/sql-reference/data-types/special-data-types/index.md +++ b/docs/ja/sql-reference/data-types/special-data-types/index.md @@ -11,4 +11,4 @@ toc_title: "\u96A0\u3057" 特別なデータ型の値は、テーブルへの保存やクエリ結果の出力のためにシリアル化することはできませんが、クエリ実行時の中間結果として使用でき -[元の記事](https://clickhouse.tech/docs/en/data_types/special_data_types/) +[元の記事](https://clickhouse.com/docs/en/data_types/special_data_types/) diff --git a/docs/ja/sql-reference/data-types/special-data-types/nothing.md b/docs/ja/sql-reference/data-types/special-data-types/nothing.md index 796a11f7a29..c4339a86752 100644 --- a/docs/ja/sql-reference/data-types/special-data-types/nothing.md +++ b/docs/ja/sql-reference/data-types/special-data-types/nothing.md @@ -23,4 +23,4 @@ SELECT toTypeName(array()) └─────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/special_data_types/nothing/) +[元の記事](https://clickhouse.com/docs/en/data_types/special_data_types/nothing/) diff --git a/docs/ja/sql-reference/data-types/special-data-types/set.md b/docs/ja/sql-reference/data-types/special-data-types/set.md index bb4cded3df2..01bfff2e8c1 100644 --- a/docs/ja/sql-reference/data-types/special-data-types/set.md +++ b/docs/ja/sql-reference/data-types/special-data-types/set.md @@ -9,4 +9,4 @@ toc_title: "\u30BB\u30C3\u30C8" の右半分に使用されます [IN](../../operators/in.md#select-in-operators) 式。 -[元の記事](https://clickhouse.tech/docs/en/data_types/special_data_types/set/) +[元の記事](https://clickhouse.com/docs/en/data_types/special_data_types/set/) diff --git a/docs/ja/sql-reference/data-types/string.md b/docs/ja/sql-reference/data-types/string.md index f487314e5cb..266c0260022 100644 --- a/docs/ja/sql-reference/data-types/string.md +++ b/docs/ja/sql-reference/data-types/string.md @@ -17,4 +17,4 @@ ClickHouseにはエンコーディングの概念はありません。 文字列 同様に、文字列を操作するための特定の関数には、UTF-8でエンコードされたテキストを表すバイトセットが文字列に含まれているという前提の下で 例えば、 ‘length’ 関数は、文字列の長さをバイト単位で計算します。 ‘lengthUTF8’ 関数は、値がUTF-8でエンコードされていると仮定して、Unicodeコードポイントで文字列の長さを計算します。 -[元の記事](https://clickhouse.tech/docs/en/data_types/string/) +[元の記事](https://clickhouse.com/docs/en/data_types/string/) diff --git a/docs/ja/sql-reference/data-types/tuple.md b/docs/ja/sql-reference/data-types/tuple.md index 7dbd2f3ea17..10ee6046daa 100644 --- a/docs/ja/sql-reference/data-types/tuple.md +++ b/docs/ja/sql-reference/data-types/tuple.md @@ -49,4 +49,4 @@ SELECT tuple(1, NULL) AS x, toTypeName(x) └──────────┴─────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/data_types/tuple/) +[元の記事](https://clickhouse.com/docs/en/data_types/tuple/) diff --git a/docs/ja/sql-reference/data-types/uuid.md b/docs/ja/sql-reference/data-types/uuid.md index 3c691dda362..ca5cccfa8cd 100644 --- a/docs/ja/sql-reference/data-types/uuid.md +++ b/docs/ja/sql-reference/data-types/uuid.md @@ -74,4 +74,4 @@ UUIDデータ型は、以下の関数のみをサポートします [文字列]( Uuidデータ型は、算術演算ではサポートされません(たとえば, [abs](../../sql-reference/functions/arithmetic-functions.md#arithm_func-abs))または、以下のような集計関数 [和](../../sql-reference/aggregate-functions/reference.md#agg_function-sum) と [avg](../../sql-reference/aggregate-functions/reference.md#agg_function-avg). -[元の記事](https://clickhouse.tech/docs/en/data_types/uuid/) +[元の記事](https://clickhouse.com/docs/en/data_types/uuid/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md index 1e99b782043..38eab3f38e2 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md @@ -67,4 +67,4 @@ ClickHouseは、階層辞書をサポートしています [数値キー](extern ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_hierarchical/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_hierarchical/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index ac632b99332..3286cf04113 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -399,4 +399,4 @@ dictGetString('prefix', 'asn', tuple(IPv6StringToNum('2001:db8::1'))) データは `trie`. それはRAMに完全に収まる必要があります。 -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_layout/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_layout/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md index 154c5b40bfb..2ead32f409a 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md @@ -88,4 +88,4 @@ SOURCE(ODBC(... invalidate_query 'SELECT update_time FROM dictionary_source wher ... ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_lifetime/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_lifetime/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md new file mode 120000 index 00000000000..a8e9c37c515 --- /dev/null +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md @@ -0,0 +1 @@ +../../../../en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md \ No newline at end of file diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md index f29a608b85e..5aefd7050e3 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md @@ -627,4 +627,4 @@ SOURCE(REDIS( - `storage_type` – The structure of internal Redis storage using for work with keys. `simple` は簡単な源のためのハッシュされたシングルキー源, `hash_map` 二つのキーを持つハッシュソース用です。 距源およびキャッシュ源の複雑な鍵サポートされていません。 省略可能であり、デフォルト値は `simple`. - `db_index` – The specific numeric index of Redis logical database. May be omitted, default value is 0. -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_sources/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_sources/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md index b35b0477b75..c8d9cb969b9 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md @@ -172,4 +172,4 @@ CREATE DICTIONARY somename ( - [外部辞書を操作するための関数](../../../sql-reference/functions/ext-dict-functions.md). -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_structure/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_structure/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md index 6972e09e324..6276b69bbfd 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md @@ -50,4 +50,4 @@ LIFETIME(...) -- Lifetime of dictionary in memory - [構造](external-dicts-dict-structure.md) — Structure of the dictionary . A key and attributes that can be retrieved by this key. - [生涯](external-dicts-dict-lifetime.md) — Frequency of dictionary updates. -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict/) diff --git a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts.md b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts.md index 01e6e57d2ca..4f90ac18267 100644 --- a/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts.md +++ b/docs/ja/sql-reference/dictionaries/external-dictionaries/external-dicts.md @@ -59,4 +59,4 @@ toc_title: "\u4E00\u822C\u7684\u306A\u8AAC\u660E" - [辞書キーとフィールド](external-dicts-dict-structure.md) - [外部辞書を操作するための関数](../../../sql-reference/functions/ext-dict-functions.md) -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/external_dicts/) diff --git a/docs/ja/sql-reference/dictionaries/index.md b/docs/ja/sql-reference/dictionaries/index.md index cb6bb168e1f..f4e6b9b2706 100644 --- a/docs/ja/sql-reference/dictionaries/index.md +++ b/docs/ja/sql-reference/dictionaries/index.md @@ -19,4 +19,4 @@ ClickHouseサポート: - [組み込み辞書](internal-dicts.md#internal_dicts) 特定の [関数のセット](../../sql-reference/functions/ym-dict-functions.md). - [プラグイン(外部)辞書](external-dictionaries/external-dicts.md#dicts-external-dicts) と [関数のセット](../../sql-reference/functions/ext-dict-functions.md). -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/) diff --git a/docs/ja/sql-reference/dictionaries/internal-dicts.md b/docs/ja/sql-reference/dictionaries/internal-dicts.md index 81b75075c27..74eb384d427 100644 --- a/docs/ja/sql-reference/dictionaries/internal-dicts.md +++ b/docs/ja/sql-reference/dictionaries/internal-dicts.md @@ -52,4 +52,4 @@ Geobaseで辞書を定期的に更新することをお勧めします。 更新 OS識別子とYandexを操作するための機能もあります。Metricaの調査エンジン、しかしそれらは使用されるべきではない。 -[元の記事](https://clickhouse.tech/docs/en/query_language/dicts/internal_dicts/) +[元の記事](https://clickhouse.com/docs/en/query_language/dicts/internal_dicts/) diff --git a/docs/ja/sql-reference/distributed-ddl.md b/docs/ja/sql-reference/distributed-ddl.md new file mode 120000 index 00000000000..705fba9bc0f --- /dev/null +++ b/docs/ja/sql-reference/distributed-ddl.md @@ -0,0 +1 @@ +../../en/sql-reference/distributed-ddl.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/arithmetic-functions.md b/docs/ja/sql-reference/functions/arithmetic-functions.md index 0afd85b63bc..77cc76d2f82 100644 --- a/docs/ja/sql-reference/functions/arithmetic-functions.md +++ b/docs/ja/sql-reference/functions/arithmetic-functions.md @@ -84,4 +84,4 @@ You can also calculate integer numbers from a date or date with time. The idea i 数値の最小公倍数を返します。 例外は、ゼロで除算するとき、または最小の負の数をマイナスで除算するときにスローされます。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/arithmetic_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/arithmetic_functions/) diff --git a/docs/ja/sql-reference/functions/array-functions.md b/docs/ja/sql-reference/functions/array-functions.md index 6eab7656c25..efb6cebab61 100644 --- a/docs/ja/sql-reference/functions/array-functions.md +++ b/docs/ja/sql-reference/functions/array-functions.md @@ -702,13 +702,13 @@ arrayDifference(array) **パラメータ** -- `array` – [配列](https://clickhouse.tech/docs/en/data_types/array/). +- `array` – [配列](https://clickhouse.com/docs/en/data_types/array/). **戻り値** 隣接する要素間の差分の配列を返します。 -タイプ: [UInt\*](https://clickhouse.tech/docs/en/data_types/int_uint/#uint-ranges), [Int\*](https://clickhouse.tech/docs/en/data_types/int_uint/#int-ranges), [フロート\*](https://clickhouse.tech/docs/en/data_types/float/). +タイプ: [UInt\*](https://clickhouse.com/docs/en/data_types/int_uint/#uint-ranges), [Int\*](https://clickhouse.com/docs/en/data_types/int_uint/#int-ranges), [フロート\*](https://clickhouse.com/docs/en/data_types/float/). **例** @@ -754,7 +754,7 @@ arrayDistinct(array) **パラメータ** -- `array` – [配列](https://clickhouse.tech/docs/en/data_types/array/). +- `array` – [配列](https://clickhouse.com/docs/en/data_types/array/). **戻り値** @@ -1058,4 +1058,4 @@ select arrayAUC([0.1, 0.4, 0.35, 0.8], [0, 0, 1, 1]) └────────────────────────────────────────---──┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/array_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/array_functions/) diff --git a/docs/ja/sql-reference/functions/array-join.md b/docs/ja/sql-reference/functions/array-join.md index d3a2ab76398..c50be7750a9 100644 --- a/docs/ja/sql-reference/functions/array-join.md +++ b/docs/ja/sql-reference/functions/array-join.md @@ -34,4 +34,4 @@ SELECT arrayJoin([1, 2, 3] AS src) AS dst, 'Hello', src └─────┴───────────┴─────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/array_join/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/array_join/) diff --git a/docs/ja/sql-reference/functions/bit-functions.md b/docs/ja/sql-reference/functions/bit-functions.md index 6ea1189f6a4..909cbf6f01f 100644 --- a/docs/ja/sql-reference/functions/bit-functions.md +++ b/docs/ja/sql-reference/functions/bit-functions.md @@ -252,4 +252,4 @@ SELECT bitCount(333) └───────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/bit_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/bit_functions/) diff --git a/docs/ja/sql-reference/functions/bitmap-functions.md b/docs/ja/sql-reference/functions/bitmap-functions.md index de3ce938444..89a165d7ff8 100644 --- a/docs/ja/sql-reference/functions/bitmap-functions.md +++ b/docs/ja/sql-reference/functions/bitmap-functions.md @@ -493,4 +493,4 @@ SELECT bitmapAndnotCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res └─────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/bitmap_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/bitmap_functions/) diff --git a/docs/ja/sql-reference/functions/comparison-functions.md b/docs/ja/sql-reference/functions/comparison-functions.md index ab223c36c6b..0e09ebe2e62 100644 --- a/docs/ja/sql-reference/functions/comparison-functions.md +++ b/docs/ja/sql-reference/functions/comparison-functions.md @@ -34,4 +34,4 @@ toc_title: "\u6BD4\u8F03" ## greaterOrEquals,\>=演算子 {#function-greaterorequals} -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/comparison_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/comparison_functions/) diff --git a/docs/ja/sql-reference/functions/conditional-functions.md b/docs/ja/sql-reference/functions/conditional-functions.md index 2a18caf743f..c553d6a61f7 100644 --- a/docs/ja/sql-reference/functions/conditional-functions.md +++ b/docs/ja/sql-reference/functions/conditional-functions.md @@ -204,4 +204,4 @@ FROM LEFT_RIGHT └──────┴───────┴──────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/conditional_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/conditional_functions/) diff --git a/docs/ja/sql-reference/functions/date-time-functions.md b/docs/ja/sql-reference/functions/date-time-functions.md index a0d51439339..565b10eaece 100644 --- a/docs/ja/sql-reference/functions/date-time-functions.md +++ b/docs/ja/sql-reference/functions/date-time-functions.md @@ -447,4 +447,4 @@ Function formats a Time according given Format string. N.B.: Format is a constan | %Y | 年 | 2018 | | %% | %記号 | % | -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/date_time_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/date_time_functions/) diff --git a/docs/ja/sql-reference/functions/encoding-functions.md b/docs/ja/sql-reference/functions/encoding-functions.md index c3eaeaa18c3..91811489028 100644 --- a/docs/ja/sql-reference/functions/encoding-functions.md +++ b/docs/ja/sql-reference/functions/encoding-functions.md @@ -172,4 +172,4 @@ FixedString(16)値を受け取ります。 36文字を含む文字列をテキ 整数を受け取ります。 合計されたときにソース番号を合計する二つのべき乗のリストを含むUInt64数値の配列を返します。 配列内の数値は昇順です。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/encoding_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/encoding_functions/) diff --git a/docs/ja/sql-reference/functions/encryption-functions.md b/docs/ja/sql-reference/functions/encryption-functions.md new file mode 120000 index 00000000000..8d33d60a5ba --- /dev/null +++ b/docs/ja/sql-reference/functions/encryption-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/encryption-functions.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/ext-dict-functions.md b/docs/ja/sql-reference/functions/ext-dict-functions.md index 8a438d6e935..6a90d99a5f0 100644 --- a/docs/ja/sql-reference/functions/ext-dict-functions.md +++ b/docs/ja/sql-reference/functions/ext-dict-functions.md @@ -202,4 +202,4 @@ dictGet[Type]OrDefault('dict_name', 'attr_name', id_expr, default_value_expr) ClickHouseは、属性の値を解析できない場合、または値が属性データ型と一致しない場合に例外をスローします。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/ext_dict_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/ext_dict_functions/) diff --git a/docs/ja/sql-reference/functions/files.md b/docs/ja/sql-reference/functions/files.md new file mode 120000 index 00000000000..df6eac6031e --- /dev/null +++ b/docs/ja/sql-reference/functions/files.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/files.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/functions-for-nulls.md b/docs/ja/sql-reference/functions/functions-for-nulls.md index cbd981a3530..5b509735945 100644 --- a/docs/ja/sql-reference/functions/functions-for-nulls.md +++ b/docs/ja/sql-reference/functions/functions-for-nulls.md @@ -309,4 +309,4 @@ SELECT toTypeName(toNullable(10)) └────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/functions_for_nulls/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/functions_for_nulls/) diff --git a/docs/ja/sql-reference/functions/geo.md b/docs/ja/sql-reference/functions/geo.md index 4237e43b8dc..01444843f9c 100644 --- a/docs/ja/sql-reference/functions/geo.md +++ b/docs/ja/sql-reference/functions/geo.md @@ -507,4 +507,4 @@ SELECT h3GetResolution(617420388352917503) as res └─────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/geo/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/geo/) diff --git a/docs/ja/sql-reference/functions/geo/coordinates.md b/docs/ja/sql-reference/functions/geo/coordinates.md new file mode 120000 index 00000000000..f3f694c50c9 --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/coordinates.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/coordinates.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/geo/geohash.md b/docs/ja/sql-reference/functions/geo/geohash.md new file mode 120000 index 00000000000..5b17ac944bb --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/geohash.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/geohash.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/geo/h3.md b/docs/ja/sql-reference/functions/geo/h3.md new file mode 120000 index 00000000000..eb3926f4e3e --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/h3.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/h3.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/geo/index.md b/docs/ja/sql-reference/functions/geo/index.md new file mode 120000 index 00000000000..8eb51e63d5b --- /dev/null +++ b/docs/ja/sql-reference/functions/geo/index.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/index.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/hash-functions.md b/docs/ja/sql-reference/functions/hash-functions.md index a98ae60690d..098e446a8c9 100644 --- a/docs/ja/sql-reference/functions/hash-functions.md +++ b/docs/ja/sql-reference/functions/hash-functions.md @@ -40,6 +40,10 @@ SELECT halfMD5(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00') └────────────────────┴────────┘ ``` +## MD4 {#hash_functions-md4} + +文字列からMD4を計算し、結果のバイトセットをFixedString(16)として返します。 + ## MD5 {#hash_functions-md5} 文字列からMD5を計算し、結果のバイトセットをFixedString(16)として返します。 @@ -143,7 +147,11 @@ SELECT groupBitXor(cityHash64(*)) FROM table ## SHA256 {#sha256} -文字列からSHA-1、SHA-224、またはSHA-256を計算し、結果のバイトセットをFixedString(20)、FixedString(28)、またはFixedString(32)として返します。 +## SHA384 {#sha384} + +## SHA512 {#sha512} + +文字列からSHA-1、SHA-224、SHA-256、SHA-384、またはSHA-512を計算し、結果のバイトセットをFixedString(20)、FixedString(28)、FixedString(32)、FixedString(48)またはFixedString(64)として返します。 この機能はかなりゆっくりと動作します(SHA-1はプロセッサコア毎秒約5万の短い文字列を処理しますが、SHA-224とSHA-256は約2.2万の短い文字列を処理 この関数は、特定のハッシュ関数が必要で選択できない場合にのみ使用することをお勧めします。 このような場合でも、SELECTに適用するのではなく、関数をオフラインで適用し、テーブルに挿入するときに値を事前に計算することをお勧めします。 @@ -481,4 +489,4 @@ SELECT xxHash32('Hello, world!'); - [xxHash](http://cyan4973.github.io/xxHash/). -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/hash_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/hash_functions/) diff --git a/docs/ja/sql-reference/functions/higher-order-functions.md b/docs/ja/sql-reference/functions/higher-order-functions.md index f130f9a2ee4..2d6a86c527d 100644 --- a/docs/ja/sql-reference/functions/higher-order-functions.md +++ b/docs/ja/sql-reference/functions/higher-order-functions.md @@ -261,4 +261,4 @@ SELECT arrayReverseSort((x, y) -> y, ['hello', 'world'], [2, 1]) as res; 詳細については、 `arrayReverseSort` 方法は、参照してください [配列を操作するための関数](array-functions.md#array_functions-reverse-sort) セクション -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/higher_order_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/higher_order_functions/) diff --git a/docs/ja/sql-reference/functions/in-functions.md b/docs/ja/sql-reference/functions/in-functions.md index 575f9787ec2..11149665474 100644 --- a/docs/ja/sql-reference/functions/in-functions.md +++ b/docs/ja/sql-reference/functions/in-functions.md @@ -23,4 +23,4 @@ For columns with the types T1, T2, …, it returns a Tuple(T1, T2, …) type tup ‘N’ 1から始まる列インデックスです。 Nは定数でなければなりません。 ‘N’ 定数でなければなりません。 ‘N’ 組のサイズより大きくない厳密なpostive整数でなければなりません。 関数を実行するコストはありません。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/in_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/in_functions/) diff --git a/docs/ja/sql-reference/functions/index.md b/docs/ja/sql-reference/functions/index.md index 0a51bbb778e..9125df5bf8e 100644 --- a/docs/ja/sql-reference/functions/index.md +++ b/docs/ja/sql-reference/functions/index.md @@ -71,4 +71,4 @@ Functions can't change the values of their arguments – any changes are returne クエリ内の関数がリクエスタサーバで実行されているが、リモートサーバで実行する必要がある場合は、リクエスタサーバにラップすることができます。 ‘any’ 関数を集計するか、キーに追加します `GROUP BY`. -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/) diff --git a/docs/ja/sql-reference/functions/ip-address-functions.md b/docs/ja/sql-reference/functions/ip-address-functions.md index 295a6f673b9..567ca0693b0 100644 --- a/docs/ja/sql-reference/functions/ip-address-functions.md +++ b/docs/ja/sql-reference/functions/ip-address-functions.md @@ -245,4 +245,4 @@ SELECT └───────────────────────────────────┴──────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/ip_address_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/ip_address_functions/) diff --git a/docs/ja/sql-reference/functions/json-functions.md b/docs/ja/sql-reference/functions/json-functions.md index 7ceb26c9c9d..8901af41e86 100644 --- a/docs/ja/sql-reference/functions/json-functions.md +++ b/docs/ja/sql-reference/functions/json-functions.md @@ -294,4 +294,4 @@ SELECT JSONExtractKeysAndValuesRaw('{"a": [-100, 200.0], "b":{"c": {"d": "hello" └───────────────────────────────────────────────────────────────────────────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/json_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/json_functions/) diff --git a/docs/ja/sql-reference/functions/logical-functions.md b/docs/ja/sql-reference/functions/logical-functions.md index b1b35c56c43..3f55fd9610b 100644 --- a/docs/ja/sql-reference/functions/logical-functions.md +++ b/docs/ja/sql-reference/functions/logical-functions.md @@ -19,4 +19,4 @@ toc_title: "\u8AD6\u7406" ## xor {#xor} -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/logical_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/logical_functions/) diff --git a/docs/ja/sql-reference/functions/math-functions.md b/docs/ja/sql-reference/functions/math-functions.md index 656d1350043..732c92fd669 100644 --- a/docs/ja/sql-reference/functions/math-functions.md +++ b/docs/ja/sql-reference/functions/math-functions.md @@ -113,4 +113,4 @@ Yの累乗に近いFloat64の数値を返します。 数値引数を受け取り、xの累乗に10に近いUInt64の数値を返します。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/math_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/math_functions/) diff --git a/docs/ja/sql-reference/functions/nlp-functions.md b/docs/ja/sql-reference/functions/nlp-functions.md new file mode 120000 index 00000000000..612039dcb2c --- /dev/null +++ b/docs/ja/sql-reference/functions/nlp-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/nlp-functions.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/other-functions.md b/docs/ja/sql-reference/functions/other-functions.md index c590612aeeb..1c5d138e22e 100644 --- a/docs/ja/sql-reference/functions/other-functions.md +++ b/docs/ja/sql-reference/functions/other-functions.md @@ -1202,4 +1202,4 @@ SELECT number, randomPrintableASCII(30) as str, length(str) FROM system.numbers └────────┴────────────────────────────────┴──────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/other_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/other_functions/) diff --git a/docs/ja/sql-reference/functions/random-functions.md b/docs/ja/sql-reference/functions/random-functions.md index b976ed513ea..364b6d88e3b 100644 --- a/docs/ja/sql-reference/functions/random-functions.md +++ b/docs/ja/sql-reference/functions/random-functions.md @@ -62,4 +62,4 @@ FROM numbers(3) └────────────┴────────────┴──────────────┴────────────────┴─────────────────┴──────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/random_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/random_functions/) diff --git a/docs/ja/sql-reference/functions/rounding-functions.md b/docs/ja/sql-reference/functions/rounding-functions.md index d4f566e53f6..de9bc11ef96 100644 --- a/docs/ja/sql-reference/functions/rounding-functions.md +++ b/docs/ja/sql-reference/functions/rounding-functions.md @@ -187,4 +187,4 @@ roundBankers(10.755, 2) = 11,76 数値を受け取り、指定された配列内の要素に切り捨てます。 値が最低限界より小さい場合は、最低限界が返されます。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/rounding_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/rounding_functions/) diff --git a/docs/ja/sql-reference/functions/splitting-merging-functions.md b/docs/ja/sql-reference/functions/splitting-merging-functions.md index 5f95efc793e..b348c3a8184 100644 --- a/docs/ja/sql-reference/functions/splitting-merging-functions.md +++ b/docs/ja/sql-reference/functions/splitting-merging-functions.md @@ -114,4 +114,4 @@ SELECT alphaTokens('abca1abc') └─────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/splitting_merging_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/splitting_merging_functions/) diff --git a/docs/ja/sql-reference/functions/string-functions.md b/docs/ja/sql-reference/functions/string-functions.md index 2c436cd2419..09e00ab1ce5 100644 --- a/docs/ja/sql-reference/functions/string-functions.md +++ b/docs/ja/sql-reference/functions/string-functions.md @@ -486,4 +486,4 @@ CRC-64-ECMA多項式を使用して、文字列のCRC64チェックサムを返 結果の型はUInt64です。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/string_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/string_functions/) diff --git a/docs/ja/sql-reference/functions/string-replace-functions.md b/docs/ja/sql-reference/functions/string-replace-functions.md index ea1b9cb66cd..b0621c99029 100644 --- a/docs/ja/sql-reference/functions/string-replace-functions.md +++ b/docs/ja/sql-reference/functions/string-replace-functions.md @@ -91,4 +91,4 @@ SELECT replaceRegexpAll('Hello, World!', '^', 'here: ') AS res この実装はre2::RE2::QuoteMetaとは若干異なります。 ゼロバイトは00の代わりに\\0としてエスケープされ、必要な文字のみがエスケープされます。 詳細は、リンクを参照してください: [RE2](https://github.com/google/re2/blob/master/re2/re2.cc#L473) -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/string_replace_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/string_replace_functions/) diff --git a/docs/ja/sql-reference/functions/string-search-functions.md b/docs/ja/sql-reference/functions/string-search-functions.md index e5858ba4941..faa904e39ba 100644 --- a/docs/ja/sql-reference/functions/string-search-functions.md +++ b/docs/ja/sql-reference/functions/string-search-functions.md @@ -380,4 +380,4 @@ SELECT multiSearchAllPositions('Hello, World!', ['hello', '!', 'world']) !!! note "注" For UTF-8 case we use 3-gram distance. All these are not perfectly fair n-gram distances. We use 2-byte hashes to hash n-grams and then calculate the (non-)symmetric difference between these hash tables – collisions may occur. With UTF-8 case-insensitive format we do not use fair `tolower` function – we zero the 5-th bit (starting from zero) of each codepoint byte and first bit of zeroth byte if bytes more than one – this works for Latin and mostly for all Cyrillic letters. -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/string_search_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/string_search_functions/) diff --git a/docs/ja/sql-reference/functions/tuple-functions.md b/docs/ja/sql-reference/functions/tuple-functions.md new file mode 120000 index 00000000000..daaf22f11f4 --- /dev/null +++ b/docs/ja/sql-reference/functions/tuple-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/tuple-functions.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/tuple-map-functions.md b/docs/ja/sql-reference/functions/tuple-map-functions.md new file mode 120000 index 00000000000..e77338e1118 --- /dev/null +++ b/docs/ja/sql-reference/functions/tuple-map-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/tuple-map-functions.md \ No newline at end of file diff --git a/docs/ja/sql-reference/functions/type-conversion-functions.md b/docs/ja/sql-reference/functions/type-conversion-functions.md index 7058407d5b5..fd935c23d5f 100644 --- a/docs/ja/sql-reference/functions/type-conversion-functions.md +++ b/docs/ja/sql-reference/functions/type-conversion-functions.md @@ -531,4 +531,4 @@ SELECT parseDateTimeBestEffort('10 20:19') 同じように [parseDateTimeBestEffort](#parsedatetimebesteffort) ただし、処理できない日付形式が検出されたときにゼロの日付またはゼロの日付時刻を返します。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/type_conversion_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/type_conversion_functions/) diff --git a/docs/ja/sql-reference/functions/url-functions.md b/docs/ja/sql-reference/functions/url-functions.md index 22e8dbd028d..02da4602618 100644 --- a/docs/ja/sql-reference/functions/url-functions.md +++ b/docs/ja/sql-reference/functions/url-functions.md @@ -206,4 +206,4 @@ URLに類似のものがない場合、URLは変更されません。 を削除します。 ‘name’ URLパラメータが存在する場合。 この関数は、パラメータ名が渡された引数とまったく同じ方法でURLにエンコードされるという前提の下で機能します。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/url_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/url_functions/) diff --git a/docs/ja/sql-reference/functions/uuid-functions.md b/docs/ja/sql-reference/functions/uuid-functions.md index 138d54b4d84..230a719eef1 100644 --- a/docs/ja/sql-reference/functions/uuid-functions.md +++ b/docs/ja/sql-reference/functions/uuid-functions.md @@ -119,4 +119,4 @@ SELECT - [dictGetUUID](ext-dict-functions.md#ext_dict_functions-other) -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/uuid_function/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/uuid_function/) diff --git a/docs/ja/sql-reference/functions/ym-dict-functions.md b/docs/ja/sql-reference/functions/ym-dict-functions.md index 53721e07103..f6120172249 100644 --- a/docs/ja/sql-reference/functions/ym-dict-functions.md +++ b/docs/ja/sql-reference/functions/ym-dict-functions.md @@ -152,4 +152,4 @@ Accepts a UInt32 number – the region ID from the Yandex geobase. A string with `ua` と `uk` もうクです。 -[元の記事](https://clickhouse.tech/docs/en/query_language/functions/ym_dict_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/functions/ym_dict_functions/) diff --git a/docs/ja/sql-reference/index.md b/docs/ja/sql-reference/index.md index 31d451b63a9..f548d4e0ed3 100644 --- a/docs/ja/sql-reference/index.md +++ b/docs/ja/sql-reference/index.md @@ -17,4 +17,4 @@ ClickHouseは次の種類のクエリをサポートします: - [ALTER](statements/alter.md#query_language_queries_alter) - [その他の種類のクエリ](statements/misc.md) -[元の記事](https://clickhouse.tech/docs/en/sql-reference/) +[元の記事](https://clickhouse.com/docs/en/sql-reference/) diff --git a/docs/ja/sql-reference/operators/index.md b/docs/ja/sql-reference/operators/index.md index 37be3231a6c..1629229ad7e 100644 --- a/docs/ja/sql-reference/operators/index.md +++ b/docs/ja/sql-reference/operators/index.md @@ -274,4 +274,4 @@ SELECT * FROM t_null WHERE y IS NOT NULL └───┴───┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/operators/) +[元の記事](https://clickhouse.com/docs/en/query_language/operators/) diff --git a/docs/ja/sql-reference/statements/alter.md b/docs/ja/sql-reference/statements/alter.md index 0967f60e06a..5f17471747d 100644 --- a/docs/ja/sql-reference/statements/alter.md +++ b/docs/ja/sql-reference/statements/alter.md @@ -599,4 +599,4 @@ ALTER SETTINGS PROFILE [IF EXISTS] name [ON CLUSTER cluster_name] [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | INHERIT 'profile_name'] [,...] ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/alter/) +[元の記事](https://clickhouse.com/docs/en/query_language/alter/) diff --git a/docs/ja/sql-reference/statements/alter/column.md b/docs/ja/sql-reference/statements/alter/column.md new file mode 120000 index 00000000000..e1123d197fe --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/column.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/column.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/constraint.md b/docs/ja/sql-reference/statements/alter/constraint.md new file mode 120000 index 00000000000..e3b245408d1 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/constraint.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/constraint.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/delete.md b/docs/ja/sql-reference/statements/alter/delete.md new file mode 120000 index 00000000000..b9d6a233197 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/delete.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/delete.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/index.md b/docs/ja/sql-reference/statements/alter/index.md new file mode 120000 index 00000000000..cd1bda718a5 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/index.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/index.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/index/index.md b/docs/ja/sql-reference/statements/alter/index/index.md new file mode 120000 index 00000000000..b754fa71b83 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/index/index.md @@ -0,0 +1 @@ +../../../../../en/sql-reference/statements/alter/index/index.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/order-by.md b/docs/ja/sql-reference/statements/alter/order-by.md new file mode 120000 index 00000000000..ef5a22dc165 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/order-by.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/order-by.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/partition.md b/docs/ja/sql-reference/statements/alter/partition.md new file mode 120000 index 00000000000..09a6fa34645 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/partition.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/partition.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/projection.md b/docs/ja/sql-reference/statements/alter/projection.md new file mode 120000 index 00000000000..b7365ec9fe4 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/projection.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/projection.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/quota.md b/docs/ja/sql-reference/statements/alter/quota.md new file mode 120000 index 00000000000..c6c477c3b61 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/quota.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/quota.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/role.md b/docs/ja/sql-reference/statements/alter/role.md new file mode 120000 index 00000000000..ce1f0a94eb3 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/role.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/role.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/row-policy.md b/docs/ja/sql-reference/statements/alter/row-policy.md new file mode 120000 index 00000000000..09ad2d301f3 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/row-policy.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/row-policy.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/sample-by.md b/docs/ja/sql-reference/statements/alter/sample-by.md new file mode 120000 index 00000000000..fda9d991f40 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/sample-by.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/sample-by.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/setting.md b/docs/ja/sql-reference/statements/alter/setting.md new file mode 120000 index 00000000000..12fdba11505 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/setting.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/setting.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/settings-profile.md b/docs/ja/sql-reference/statements/alter/settings-profile.md new file mode 120000 index 00000000000..0e71ac4e831 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/settings-profile.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/settings-profile.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/ttl.md b/docs/ja/sql-reference/statements/alter/ttl.md new file mode 120000 index 00000000000..94a112e7a17 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/ttl.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/ttl.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/update.md b/docs/ja/sql-reference/statements/alter/update.md new file mode 120000 index 00000000000..fa9be21c070 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/update.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/update.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/user.md b/docs/ja/sql-reference/statements/alter/user.md new file mode 120000 index 00000000000..9379ef3aaf6 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/user.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/user.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/alter/view.md b/docs/ja/sql-reference/statements/alter/view.md new file mode 120000 index 00000000000..89bdcee5912 --- /dev/null +++ b/docs/ja/sql-reference/statements/alter/view.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/view.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/attach.md b/docs/ja/sql-reference/statements/attach.md new file mode 120000 index 00000000000..54672449823 --- /dev/null +++ b/docs/ja/sql-reference/statements/attach.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/attach.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/check-table.md b/docs/ja/sql-reference/statements/check-table.md new file mode 120000 index 00000000000..1ce3a05c6ea --- /dev/null +++ b/docs/ja/sql-reference/statements/check-table.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/check-table.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create.md b/docs/ja/sql-reference/statements/create.md index 1d1f2c57556..0117b082faf 100644 --- a/docs/ja/sql-reference/statements/create.md +++ b/docs/ja/sql-reference/statements/create.md @@ -147,8 +147,6 @@ ENGINE = ... ``` -コーデックが指定されている場合、既定のコーデックは適用されません。 コーデックはパイプラインで結合できます。, `CODEC(Delta, ZSTD)`. の選定と大型ブリッジダイオードコーデックの組み合わせますプロジェクト、ベンチマークと同様に記載のAltinity [ClickHouseの効率を改善する新しい符号化](https://www.altinity.com/blog/2019/7/new-encodings-to-improve-clickhouse) 記事だ - !!! warning "警告" できない解凍ClickHouseデータベースファイルを外部の事のように `lz4`. 代わりに、特別な [clickhouse-コンプレッサー](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor) ユーティリティ @@ -499,4 +497,4 @@ CREATE SETTINGS PROFILE [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_na CREATE SETTINGS PROFILE max_memory_usage_profile SETTINGS max_memory_usage = 100000001 MIN 90000000 MAX 110000000 TO robin ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/create/) +[元の記事](https://clickhouse.com/docs/en/query_language/create/) diff --git a/docs/ja/sql-reference/statements/create/database.md b/docs/ja/sql-reference/statements/create/database.md new file mode 120000 index 00000000000..4c8069ab92b --- /dev/null +++ b/docs/ja/sql-reference/statements/create/database.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/database.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/dictionary.md b/docs/ja/sql-reference/statements/create/dictionary.md new file mode 120000 index 00000000000..e9eff6ba066 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/dictionary.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/dictionary.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/function.md b/docs/ja/sql-reference/statements/create/function.md new file mode 120000 index 00000000000..d41429cb260 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/function.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/function.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/index.md b/docs/ja/sql-reference/statements/create/index.md new file mode 120000 index 00000000000..0f8d5c71d28 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/index.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/index.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/quota.md b/docs/ja/sql-reference/statements/create/quota.md new file mode 120000 index 00000000000..f941b7bcdad --- /dev/null +++ b/docs/ja/sql-reference/statements/create/quota.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/quota.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/role.md b/docs/ja/sql-reference/statements/create/role.md new file mode 120000 index 00000000000..d48b490bb1f --- /dev/null +++ b/docs/ja/sql-reference/statements/create/role.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/role.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/row-policy.md b/docs/ja/sql-reference/statements/create/row-policy.md new file mode 120000 index 00000000000..383ef88ed1f --- /dev/null +++ b/docs/ja/sql-reference/statements/create/row-policy.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/row-policy.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/settings-profile.md b/docs/ja/sql-reference/statements/create/settings-profile.md new file mode 120000 index 00000000000..093dd9adcde --- /dev/null +++ b/docs/ja/sql-reference/statements/create/settings-profile.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/settings-profile.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/table.md b/docs/ja/sql-reference/statements/create/table.md new file mode 120000 index 00000000000..61a92816de6 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/table.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/table.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/user.md b/docs/ja/sql-reference/statements/create/user.md new file mode 120000 index 00000000000..5c4882bede7 --- /dev/null +++ b/docs/ja/sql-reference/statements/create/user.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/user.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/create/view.md b/docs/ja/sql-reference/statements/create/view.md new file mode 120000 index 00000000000..7fbc2d67bec --- /dev/null +++ b/docs/ja/sql-reference/statements/create/view.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/view.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/describe-table.md b/docs/ja/sql-reference/statements/describe-table.md new file mode 120000 index 00000000000..eb76534f3cd --- /dev/null +++ b/docs/ja/sql-reference/statements/describe-table.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/describe-table.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/detach.md b/docs/ja/sql-reference/statements/detach.md new file mode 120000 index 00000000000..19d37ee535a --- /dev/null +++ b/docs/ja/sql-reference/statements/detach.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/detach.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/drop.md b/docs/ja/sql-reference/statements/drop.md new file mode 120000 index 00000000000..48fe0648c6b --- /dev/null +++ b/docs/ja/sql-reference/statements/drop.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/drop.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/exchange.md b/docs/ja/sql-reference/statements/exchange.md new file mode 120000 index 00000000000..8213eac93b7 --- /dev/null +++ b/docs/ja/sql-reference/statements/exchange.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/exchange.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/exists.md b/docs/ja/sql-reference/statements/exists.md new file mode 120000 index 00000000000..d69e8224fe6 --- /dev/null +++ b/docs/ja/sql-reference/statements/exists.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/exists.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/explain.md b/docs/ja/sql-reference/statements/explain.md new file mode 120000 index 00000000000..36f1f2cc9d4 --- /dev/null +++ b/docs/ja/sql-reference/statements/explain.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/explain.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/grant.md b/docs/ja/sql-reference/statements/grant.md index 4a088e0e78b..6300ecd2987 100644 --- a/docs/ja/sql-reference/statements/grant.md +++ b/docs/ja/sql-reference/statements/grant.md @@ -475,4 +475,4 @@ GRANT INSERT(x,y) ON db.table TO john この `ADMIN OPTION` 特典できるユーザー補助金の役割を他のユーザーです。 -[元の記事](https://clickhouse.tech/docs/en/query_language/grant/) +[元の記事](https://clickhouse.com/docs/en/query_language/grant/) diff --git a/docs/ja/sql-reference/statements/insert-into.md b/docs/ja/sql-reference/statements/insert-into.md index 2709137a04e..d9e8821a70c 100644 --- a/docs/ja/sql-reference/statements/insert-into.md +++ b/docs/ja/sql-reference/statements/insert-into.md @@ -77,4 +77,4 @@ INSERT INTO [db.]table [(c1, c2, c3)] SELECT ... - データはリアルタイムで追加されます。 - アップロードしたデータとは、通常はソートされました。 -[元の記事](https://clickhouse.tech/docs/en/query_language/insert_into/) +[元の記事](https://clickhouse.com/docs/en/query_language/insert_into/) diff --git a/docs/ja/sql-reference/statements/kill.md b/docs/ja/sql-reference/statements/kill.md new file mode 120000 index 00000000000..1afbc9008f3 --- /dev/null +++ b/docs/ja/sql-reference/statements/kill.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/kill.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/misc.md b/docs/ja/sql-reference/statements/misc.md index d4f4b245c9a..71202782ab4 100644 --- a/docs/ja/sql-reference/statements/misc.md +++ b/docs/ja/sql-reference/statements/misc.md @@ -355,4 +355,4 @@ USE db 現在のデータベースは、データベースがクエリで明示的に定義されていない場合、テーブルの検索に使用されます。 セッションの概念がないため、HTTPプロトコルを使用する場合は、このクエリを実行できません。 -[元の記事](https://clickhouse.tech/docs/en/query_language/misc/) +[元の記事](https://clickhouse.com/docs/en/query_language/misc/) diff --git a/docs/ja/sql-reference/statements/rename.md b/docs/ja/sql-reference/statements/rename.md new file mode 120000 index 00000000000..889822decaa --- /dev/null +++ b/docs/ja/sql-reference/statements/rename.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/rename.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/select/all.md b/docs/ja/sql-reference/statements/select/all.md new file mode 120000 index 00000000000..871440515a0 --- /dev/null +++ b/docs/ja/sql-reference/statements/select/all.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/select/all.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/set-role.md b/docs/ja/sql-reference/statements/set-role.md new file mode 120000 index 00000000000..a6525622a68 --- /dev/null +++ b/docs/ja/sql-reference/statements/set-role.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/set-role.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/set.md b/docs/ja/sql-reference/statements/set.md new file mode 120000 index 00000000000..02e106afc9f --- /dev/null +++ b/docs/ja/sql-reference/statements/set.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/set.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/show.md b/docs/ja/sql-reference/statements/show.md index 8f2ee59a259..a68b5bf130f 100644 --- a/docs/ja/sql-reference/statements/show.md +++ b/docs/ja/sql-reference/statements/show.md @@ -166,4 +166,4 @@ Aで使用されたパラメータを示します [設定プロファイルの SHOW CREATE [SETTINGS] PROFILE name ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/show/) +[元の記事](https://clickhouse.com/docs/en/query_language/show/) diff --git a/docs/ja/sql-reference/statements/system.md b/docs/ja/sql-reference/statements/system.md index c15c3a79cd5..08c077e4fac 100644 --- a/docs/ja/sql-reference/statements/system.md +++ b/docs/ja/sql-reference/statements/system.md @@ -110,4 +110,4 @@ MergeTreeファミリ内のテーブルのバックグラウンドマージを SYSTEM START MERGES [[db.]merge_tree_family_table_name] ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/system/) +[元の記事](https://clickhouse.com/docs/en/query_language/system/) diff --git a/docs/ja/sql-reference/statements/truncate.md b/docs/ja/sql-reference/statements/truncate.md new file mode 120000 index 00000000000..92fbd705e8f --- /dev/null +++ b/docs/ja/sql-reference/statements/truncate.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/truncate.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/use.md b/docs/ja/sql-reference/statements/use.md new file mode 120000 index 00000000000..7bdbf049326 --- /dev/null +++ b/docs/ja/sql-reference/statements/use.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/use.md \ No newline at end of file diff --git a/docs/ja/sql-reference/statements/watch.md b/docs/ja/sql-reference/statements/watch.md new file mode 120000 index 00000000000..a79631bf222 --- /dev/null +++ b/docs/ja/sql-reference/statements/watch.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/watch.md \ No newline at end of file diff --git a/docs/ja/sql-reference/syntax.md b/docs/ja/sql-reference/syntax.md index 5d15f408b5d..49dd17e0cb1 100644 --- a/docs/ja/sql-reference/syntax.md +++ b/docs/ja/sql-reference/syntax.md @@ -184,4 +184,4 @@ Code: 184. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception 式のリストは、カンマで区切られた一つ以上の式です。 関数と演算子は、引数として式を持つことができます。 -[元の記事](https://clickhouse.tech/docs/en/sql_reference/syntax/) +[元の記事](https://clickhouse.com/docs/en/sql_reference/syntax/) diff --git a/docs/ja/sql-reference/table-functions/cluster.md b/docs/ja/sql-reference/table-functions/cluster.md new file mode 120000 index 00000000000..4721debec48 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/cluster.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/cluster.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/dictionary.md b/docs/ja/sql-reference/table-functions/dictionary.md new file mode 120000 index 00000000000..f9f453831a4 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/dictionary.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/dictionary.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/file.md b/docs/ja/sql-reference/table-functions/file.md index 7f93df69495..fe7484ace49 100644 --- a/docs/ja/sql-reference/table-functions/file.md +++ b/docs/ja/sql-reference/table-functions/file.md @@ -116,6 +116,6 @@ FROM file('big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name String, value UInt32') **も参照。** -- [仮想列](https://clickhouse.tech/docs/en/operations/table_engines/#table_engines-virtual_columns) +- [仮想列](https://clickhouse.com/docs/en/operations/table_engines/#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/file/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/file/) diff --git a/docs/ja/sql-reference/table-functions/generate.md b/docs/ja/sql-reference/table-functions/generate.md index 0e76b88945e..1fa8fdcbb94 100644 --- a/docs/ja/sql-reference/table-functions/generate.md +++ b/docs/ja/sql-reference/table-functions/generate.md @@ -41,4 +41,4 @@ SELECT * FROM generateRandom('a Array(Int8), d Decimal32(4), c Tuple(DateTime64( └──────────┴──────────────┴────────────────────────────────────────────────────────────────────┘ ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/generate/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/generate/) diff --git a/docs/ja/sql-reference/table-functions/hdfs.md b/docs/ja/sql-reference/table-functions/hdfs.md index 23772bc2400..b166b13d698 100644 --- a/docs/ja/sql-reference/table-functions/hdfs.md +++ b/docs/ja/sql-reference/table-functions/hdfs.md @@ -99,6 +99,6 @@ FROM hdfs('hdfs://hdfs1:9000/big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name Strin **も参照。** -- [仮想列](https://clickhouse.tech/docs/en/operations/table_engines/#table_engines-virtual_columns) +- [仮想列](https://clickhouse.com/docs/en/operations/table_engines/#table_engines-virtual_columns) -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/hdfs/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/hdfs/) diff --git a/docs/ja/sql-reference/table-functions/index.md b/docs/ja/sql-reference/table-functions/index.md index 10ef4b991af..5ea4266466c 100644 --- a/docs/ja/sql-reference/table-functions/index.md +++ b/docs/ja/sql-reference/table-functions/index.md @@ -35,4 +35,4 @@ toc_title: "\u306F\u3058\u3081\u306B" | [odbc](odbc.md) | を作成します。 [ODBC](../../engines/table-engines/integrations/odbc.md)-エンジンテーブル。 | | [hdfs](hdfs.md) | を作成します。 [HDFS](../../engines/table-engines/integrations/hdfs.md)-エンジンテーブル。 | -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/) diff --git a/docs/ja/sql-reference/table-functions/input.md b/docs/ja/sql-reference/table-functions/input.md index f40be9d250f..ea3d64241fe 100644 --- a/docs/ja/sql-reference/table-functions/input.md +++ b/docs/ja/sql-reference/table-functions/input.md @@ -44,4 +44,4 @@ $ cat data.csv | clickhouse-client --query="INSERT INTO test FORMAT CSV" $ cat data.csv | clickhouse-client --query="INSERT INTO test SELECT * FROM input('test_structure') FORMAT CSV" ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/input/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/input/) diff --git a/docs/ja/sql-reference/table-functions/jdbc.md b/docs/ja/sql-reference/table-functions/jdbc.md index 313aefdf581..670c53a6663 100644 --- a/docs/ja/sql-reference/table-functions/jdbc.md +++ b/docs/ja/sql-reference/table-functions/jdbc.md @@ -37,4 +37,4 @@ FROM jdbc('mysql-dev?datasource_column', 'show databases') a INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/ja/sql-reference/table-functions/merge.md b/docs/ja/sql-reference/table-functions/merge.md index 46981706844..097b020f65a 100644 --- a/docs/ja/sql-reference/table-functions/merge.md +++ b/docs/ja/sql-reference/table-functions/merge.md @@ -11,4 +11,4 @@ toc_title: "\u30DE\u30FC\u30B8" テーブル構造は、正規表現に一致する最初に検出されたテーブルから取得されます。 -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/merge/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/merge/) diff --git a/docs/ja/sql-reference/table-functions/mysql.md b/docs/ja/sql-reference/table-functions/mysql.md index d7b494bb423..50c3dacaf3a 100644 --- a/docs/ja/sql-reference/table-functions/mysql.md +++ b/docs/ja/sql-reference/table-functions/mysql.md @@ -83,4 +83,4 @@ SELECT * FROM mysql('localhost:3306', 'test', 'test', 'bayonet', '123') - [その ‘MySQL’ 表エンジン](../../engines/table-engines/integrations/mysql.md) - [外部辞書のソースとしてMySQLを使用する](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-mysql) -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/mysql/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/mysql/) diff --git a/docs/ja/sql-reference/table-functions/null.md b/docs/ja/sql-reference/table-functions/null.md new file mode 120000 index 00000000000..bff05386e28 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/null.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/null.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/numbers.md b/docs/ja/sql-reference/table-functions/numbers.md index 3cc35fc2d82..04f1e10c459 100644 --- a/docs/ja/sql-reference/table-functions/numbers.md +++ b/docs/ja/sql-reference/table-functions/numbers.md @@ -27,4 +27,4 @@ SELECT * FROM system.numbers LIMIT 10; select toDate('2010-01-01') + number as d FROM numbers(365); ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/numbers/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/numbers/) diff --git a/docs/ja/sql-reference/table-functions/odbc.md b/docs/ja/sql-reference/table-functions/odbc.md index 746a8e44ddf..10d285d66be 100644 --- a/docs/ja/sql-reference/table-functions/odbc.md +++ b/docs/ja/sql-reference/table-functions/odbc.md @@ -105,4 +105,4 @@ SELECT * FROM odbc('DSN=mysqlconn', 'test', 'test') - [ODBC外部辞書](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-odbc) - [ODBCテーブルエンジン](../../engines/table-engines/integrations/odbc.md). -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/ja/sql-reference/table-functions/postgresql.md b/docs/ja/sql-reference/table-functions/postgresql.md new file mode 120000 index 00000000000..4fb04199780 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/postgresql.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/postgresql.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/remote.md b/docs/ja/sql-reference/table-functions/remote.md index b2ec55ec182..19a3b17beb6 100644 --- a/docs/ja/sql-reference/table-functions/remote.md +++ b/docs/ja/sql-reference/table-functions/remote.md @@ -82,4 +82,4 @@ example01-{01..02}-{1|2} `remoteSecure` -同じように `remote` but with secured connection. Default port — [tcp_port_secure](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-tcp_port_secure) 設定または9440から。 -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/remote/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/remote/) diff --git a/docs/ja/sql-reference/table-functions/s3.md b/docs/ja/sql-reference/table-functions/s3.md new file mode 120000 index 00000000000..1878638f6e2 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/s3.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/s3.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/s3Cluster.md b/docs/ja/sql-reference/table-functions/s3Cluster.md new file mode 120000 index 00000000000..48e5367084e --- /dev/null +++ b/docs/ja/sql-reference/table-functions/s3Cluster.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/s3Cluster.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/sqlite.md b/docs/ja/sql-reference/table-functions/sqlite.md new file mode 120000 index 00000000000..7f203c4d062 --- /dev/null +++ b/docs/ja/sql-reference/table-functions/sqlite.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/sqlite.md \ No newline at end of file diff --git a/docs/ja/sql-reference/table-functions/url.md b/docs/ja/sql-reference/table-functions/url.md index 245bbae29e0..13362f9cff2 100644 --- a/docs/ja/sql-reference/table-functions/url.md +++ b/docs/ja/sql-reference/table-functions/url.md @@ -23,4 +23,4 @@ structure-テーブルの構造 `'UserID UInt64, Name String'` 形式。 列名 SELECT * FROM url('http://127.0.0.1:12345/', CSV, 'column1 String, column2 UInt32') LIMIT 3 ``` -[元の記事](https://clickhouse.tech/docs/en/query_language/table_functions/url/) +[元の記事](https://clickhouse.com/docs/en/query_language/table_functions/url/) diff --git a/docs/ja/sql-reference/table-functions/view.md b/docs/ja/sql-reference/table-functions/view.md new file mode 120000 index 00000000000..19a5bf245cd --- /dev/null +++ b/docs/ja/sql-reference/table-functions/view.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/view.md \ No newline at end of file diff --git a/docs/ja/sql-reference/window-functions/index.md b/docs/ja/sql-reference/window-functions/index.md new file mode 120000 index 00000000000..206505bf0eb --- /dev/null +++ b/docs/ja/sql-reference/window-functions/index.md @@ -0,0 +1 @@ +../../../en/sql-reference/window-functions/index.md \ No newline at end of file diff --git a/docs/ja/whats-new/changelog/2020.md b/docs/ja/whats-new/changelog/2020.md new file mode 120000 index 00000000000..f0fb97311d2 --- /dev/null +++ b/docs/ja/whats-new/changelog/2020.md @@ -0,0 +1 @@ +../../../en/whats-new/changelog/2020.md \ No newline at end of file diff --git a/docs/ja/whats-new/roadmap.md b/docs/ja/whats-new/roadmap.md index 468d4599b8f..c67f7d977ea 100644 --- a/docs/ja/whats-new/roadmap.md +++ b/docs/ja/whats-new/roadmap.md @@ -16,4 +16,4 @@ toc_title: "\u30ED\u30FC\u30C9" - 外部認証サービスとの統合 - 資源のプールのためのより精密な分布のクラスター能力とユーザー -{## [元の記事](https://clickhouse.tech/docs/en/roadmap/) ##} +{## [元の記事](https://clickhouse.com/docs/en/roadmap/) ##} diff --git a/docs/ja/whats-new/security-changelog.md b/docs/ja/whats-new/security-changelog.md index aa93f9c42ae..73665a2bc0b 100644 --- a/docs/ja/whats-new/security-changelog.md +++ b/docs/ja/whats-new/security-changelog.md @@ -73,4 +73,4 @@ Debパッケージ内の不適切な構成は、データベースの不正使 クレジット:英国の国立サイバーセキュリティセンター(NCSC) -{## [元の記事](https://clickhouse.tech/docs/en/security_changelog/) ##} +{## [元の記事](https://clickhouse.com/docs/en/security_changelog/) ##} diff --git a/docs/ru/commercial/cloud.md b/docs/ru/commercial/cloud.md index e00fc3be673..549978f3cdf 100644 --- a/docs/ru/commercial/cloud.md +++ b/docs/ru/commercial/cloud.md @@ -5,54 +5,5 @@ toc_title: "Поставщики облачных услуг ClickHouse" # Поставщики облачных услуг ClickHouse {#clickhouse-cloud-service-providers} -!!! info "Инфо" - Если вы запустили публичный облачный сервис с управляемым ClickHouse, не стесняйтесь [открыть pull request](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/cloud.md) c добавлением его в последующий список. - -## Yandex Cloud {#yandex-cloud} - -[Yandex Managed Service for ClickHouse](https://cloud.yandex.ru/services/managed-clickhouse?utm_source=referrals&utm_medium=clickhouseofficialsite&utm_campaign=link3) предоставляет следующие ключевые возможности: - -- полностью управляемый сервис ZooKeeper для [репликации ClickHouse](../engines/table-engines/mergetree-family/replication.md) -- выбор типа хранилища -- реплики в разных зонах доступности -- шифрование и изоляция -- автоматизированное техническое обслуживание - -## Altinity.Cloud {#altinity.cloud} - -[Altinity.Cloud](https://altinity.com/cloud-database/) — это полностью управляемый ClickHouse-as-a-Service для публичного облака Amazon. - -- быстрое развертывание кластеров ClickHouse на ресурсах Amazon. -- легкое горизонтальное масштабирование также, как и вертикальное масштабирование узлов. -- изолированные виртуальные сети для каждого клиента с общедоступным эндпоинтом или пирингом VPC. -- настраиваемые типы и объемы хранилищ -- cross-az масштабирование для повышения производительности и обеспечения высокой доступности -- встроенный мониторинг и редактор SQL-запросов - -## Alibaba Cloud {#alibaba-cloud} - -Управляемый облачный сервис Alibaba для ClickHouse: [китайская площадка](https://www.aliyun.com/product/clickhouse), будет доступен на международной площадке в мае 2021 года. Сервис предоставляет следующие возможности: - -- надежный сервер для облачного хранилища на основе распределенной системы [Alibaba Cloud Apsara](https://www.alibabacloud.com/product/apsara-stack); -- расширяемая по запросу емкость, без переноса данных вручную; -- поддержка одноузловой и многоузловой архитектуры, архитектуры с одной или несколькими репликами, а также многоуровневого хранения cold и hot data; -- поддержка прав доступа, one-key восстановления, многоуровневая защита сети, шифрование облачного диска; -- полная интеграция с облачными системами логирования, базами данных и инструментами обработки данных; -- встроенная платформа для мониторинга и управления базами данных; -- техническая поддержка от экспертов по работе с базами данных. - -## SberCloud {#sbercloud} - -[Облачная платформа SberCloud.Advanced](https://sbercloud.ru/ru/advanced): - -- предоставляет более 50 высокотехнологичных сервисов; -- позволяет быстро создавать и эффективно управлять ИТ-инфраструктурой, приложениями и интернет-сервисами; -- радикально минимизирует ресурсы, требуемые для работы корпоративных ИТ-систем; -- в разы сокращает время вывода новых продуктов на рынок. - -SberCloud.Advanced предоставляет [MapReduce Service (MRS)](https://docs.sbercloud.ru/mrs/ug/topics/ug__clickhouse.html) — надежную, безопасную и простую в использовании платформу корпоративного уровня для хранения, обработки и анализа больших данных. MRS позволяет быстро создавать и управлять кластерами ClickHouse. - -- Инстанс ClickHouse состоит из трех узлов ZooKeeper и нескольких узлов ClickHouse. Выделенный режим реплики используется для обеспечения высокой надежности двойных копий данных. -- MRS предлагает возможности гибкого масштабирования при быстром росте сервисов в сценариях, когда емкости кластерного хранилища или вычислительных ресурсов процессора недостаточно. MRS в один клик предоставляет инструмент для балансировки данных при расширении узлов ClickHouse в кластере. Вы можете определить режим и время балансировки данных на основе характеристик сервиса, чтобы обеспечить доступность сервиса. -- MRS использует архитектуру развертывания высокой доступности на основе Elastic Load Balance (ELB) — сервиса для автоматического распределения трафика на несколько внутренних узлов. Благодаря ELB, данные записываются в локальные таблицы и считываются из распределенных таблиц на разных узлах. Такая архитектура повышает отказоустойчивость кластера и гарантирует высокую доступность приложений. - +!!! info "Info" + Detailed public description for ClickHouse cloud services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/ru/commercial/index.md b/docs/ru/commercial/index.md index 66b1b125823..00fb1be7625 100644 --- a/docs/ru/commercial/index.md +++ b/docs/ru/commercial/index.md @@ -10,8 +10,5 @@ toc_title: "Коммерческие услуги" Категории услуг: -- Облачные услуги [Cloud](../commercial/cloud.md) -- Поддержка [Support](../commercial/support.md) - -!!! note "Для поставщиков услуг" - Если вы — представитель компании-поставщика услуг, вы можете отправить запрос на добавление вашей компании и ваших услуг в соответствующий раздел данной документации (или на добавление нового раздела, если ваши услуги не соответствуют ни одной из существующих категорий). Чтобы отправить запрос (pull-request) на добавление описания в документацию, нажмите на значок "карандаша" в правом верхнем углу страницы. Если ваши услуги доступны в только отдельных регионах, не забудьте указать это на соответствующих локализованных страницах (и обязательно отметьте это при отправке заявки). +- [Облачные услуги](../commercial/cloud.md) +- [Поддержка](../commercial/support.md) diff --git a/docs/ru/development/adding_test_queries.md b/docs/ru/development/adding_test_queries.md new file mode 120000 index 00000000000..def9c4077be --- /dev/null +++ b/docs/ru/development/adding_test_queries.md @@ -0,0 +1 @@ +../../en/development/adding_test_queries.md \ No newline at end of file diff --git a/docs/ru/development/architecture.md b/docs/ru/development/architecture.md index d2cfc44b711..77effe5916a 100644 --- a/docs/ru/development/architecture.md +++ b/docs/ru/development/architecture.md @@ -36,7 +36,7 @@ ClickHouse - полноценная колоночная СУБД. Данные `IDataType` и `IColumn` слабо связаны друг с другом. Различные типы данных могут быть представлены в памяти с помощью одной реализации `IColumn`. Например, и `DataTypeUInt32`, и `DataTypeDateTime` в памяти представлены как `ColumnUInt32` или `ColumnConstUInt32`. В добавок к этому, один тип данных может быть представлен различными реализациями `IColumn`. Например, `DataTypeUInt8` может быть представлен как `ColumnUInt8` и `ColumnConstUInt8`. -`IDataType` хранит только метаданные. Например, `DataTypeUInt8` не хранить ничего (кроме скрытого указателя `vptr`), а `DataTypeFixedString` хранит только `N` (фиксированный размер строки). +`IDataType` хранит только метаданные. Например, `DataTypeUInt8` не хранит ничего (кроме скрытого указателя `vptr`), а `DataTypeFixedString` хранит только `N` (фиксированный размер строки). В `IDataType` есть вспомогательные методы для данных различного формата. Среди них методы сериализации значений, допускающих использование кавычек, сериализации значения в JSON или XML. Среди них нет прямого соответствия форматам данных. Например, различные форматы `Pretty` и `TabSeparated` могут использовать один вспомогательный метод `serializeTextEscaped` интерфейса `IDataType`. @@ -62,7 +62,7 @@ ClickHouse - полноценная колоночная СУБД. Данные > Потоки блоков используют «втягивающий» (pull) подход к управлению потоком выполнения: когда вы вытягиваете блок из первого потока, он, следовательно, вытягивает необходимые блоки из вложенных потоков, так и работает весь конвейер выполнения. Ни «pull» ни «push» не имеют явного преимущества, потому что поток управления неявный, и это ограничивает в реализации различных функций, таких как одновременное выполнение нескольких запросов (слияние нескольких конвейеров вместе). Это ограничение можно преодолеть с помощью сопрограмм (coroutines) или просто запуском дополнительных потоков, которые ждут друг друга. У нас может быть больше возможностей, если мы сделаем поток управления явным: если мы локализуем логику для передачи данных из одной расчетной единицы в другую вне этих расчетных единиц. Читайте эту [статью](http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/) для углубленного изучения. -Следует отметить, что конвейер выполнения запроса создает временные данные на каждом шаге. Мы стараемся сохранить размер блока достаточно маленьким, чтобы временные данные помещались в кэш процессора. При таком допущении запись и чтение временных данных практически бесплатны по сравнению с другими расчетами. Мы могли бы рассмотреть альтернативу, которая заключается в том, чтобы объединить многие операции в конвеере вместе. Это может сделать конвейер как можно короче и удалить большую часть временных данных, что может быть преимуществом, но у такого подхода также есть недостатки. Например, разделенный конвейер позволяет легко реализовать кэширование промежуточных данных, использование промежуточных данных из аналогичных запросов, выполняемых одновременно, и объединение конвейеров для аналогичных запросов. +Следует отметить, что конвейер выполнения запроса создает временные данные на каждом шаге. Мы стараемся сохранить размер блока достаточно маленьким, чтобы временные данные помещались в кэш процессора. При таком допущении запись и чтение временных данных практически бесплатны по сравнению с другими расчетами. Мы могли бы рассмотреть альтернативу, которая заключается в том, чтобы объединить многие операции в конвейере вместе. Это может сделать конвейер как можно короче и удалить большую часть временных данных, что может быть преимуществом, но у такого подхода также есть недостатки. Например, разделенный конвейер позволяет легко реализовать кэширование промежуточных данных, использование промежуточных данных из аналогичных запросов, выполняемых одновременно, и объединение конвейеров для аналогичных запросов. ## Форматы {#formats} @@ -119,7 +119,7 @@ ClickHouse - полноценная колоночная СУБД. Данные Существуют обычные функции и агрегатные функции. Агрегатные функции смотрите в следующем разделе. -Обычный функции не изменяют число строк и работают так, как если бы обрабатывали каждую строку независимо. В действительности же, функции вызываются не к отдельным строкам, а блокам данных для реализации векторизованного выполнения запросов. +Обычные функции не изменяют число строк и работают так, как если бы обрабатывали каждую строку независимо. В действительности же, функции вызываются не к отдельным строкам, а блокам данных для реализации векторизованного выполнения запросов. Некоторые функции, такие как [blockSize](../sql-reference/functions/other-functions.md#function-blocksize), [rowNumberInBlock](../sql-reference/functions/other-functions.md#function-rownumberinblock), и [runningAccumulate](../sql-reference/functions/other-functions.md#runningaccumulate), эксплуатируют блочную обработку и нарушают независимость строк. @@ -162,7 +162,7 @@ ClickHouse имеет сильную типизацию, поэтому нет Сервера в кластере в основном независимы. Вы можете создать `Распределенную` (`Distributed`) таблицу на одном или всех серверах в кластере. Такая таблица сама по себе не хранит данные - она только предоставляет возможность "просмотра" всех локальных таблиц на нескольких узлах кластера. При выполнении `SELECT` распределенная таблица переписывает запрос, выбирает удаленные узлы в соответствии с настройками балансировки нагрузки и отправляет им запрос. Распределенная таблица просит удаленные сервера обработать запрос до той стадии, когда промежуточные результаты с разных серверов могут быть объединены. Затем он получает промежуточные результаты и объединяет их. Распределенная таблица пытается возложить как можно больше работы на удаленные серверы и сократить объем промежуточных данных, передаваемых по сети. -Ситуация усложняется, при использовании подзапросов в случае `IN` или `JOIN`, когда каждый из них использует таблицу `Distributed`. Есть разные стратегии для выполнения таких запросов. +Ситуация усложняется при использовании подзапросов в случае `IN` или `JOIN`, когда каждый из них использует таблицу `Distributed`. Есть разные стратегии для выполнения таких запросов. Глобального плана выполнения распределенных запросов не существует. Каждый узел имеет собственный локальный план для своей части работы. У нас есть простое однонаправленное выполнение распределенных запросов: мы отправляем запросы на удаленные узлы и затем объединяем результаты. Но это невозможно для сложных запросов `GROUP BY` высокой кардинальности или запросов с большим числом временных данных в `JOIN`: в таких случаях нам необходимо перераспределить («reshuffle») данные между серверами, что требует дополнительной координации. ClickHouse не поддерживает выполнение запросов такого рода, и нам нужно работать над этим. @@ -199,4 +199,4 @@ ClickHouse имеет сильную типизацию, поэтому нет !!! note "Note" Кластер ClickHouse состоит из независимых шардов, а каждый шард состоит из реплик. Кластер **не является эластичным** (not elastic), поэтому после добавления нового шарда данные не будут автоматически распределены между ними. Вместо этого нужно изменить настройки, чтобы выровнять нагрузку на кластер. Эта реализация дает вам больший контроль, и вполне приемлема для относительно небольших кластеров, таких как десятки узлов. Но для кластеров с сотнями узлов, которые мы используем в эксплуатации, такой подход становится существенным недостатком. Движки таблиц, которые охватывают весь кластер с динамически реплицируемыми областями, которые могут быть автоматически разделены и сбалансированы между кластерами, еще предстоит реализовать. -{## [Original article](https://clickhouse.tech/docs/ru/development/architecture/) ##} +{## [Original article](https://clickhouse.com/docs/ru/development/architecture/) ##} diff --git a/docs/ru/development/browse-code.md b/docs/ru/development/browse-code.md index 3f6de574abe..196054c3307 100644 --- a/docs/ru/development/browse-code.md +++ b/docs/ru/development/browse-code.md @@ -6,7 +6,7 @@ toc_title: "Навигация по коду ClickHouse" # Навигация по коду ClickHouse {#navigatsiia-po-kodu-clickhouse} -Для навигации по коду онлайн доступен **Woboq**, он расположен [здесь](https://clickhouse.tech/codebrowser/html_report///ClickHouse/src/index.html). В нём реализовано удобное перемещение между исходными файлами, семантическая подсветка, подсказки, индексация и поиск. Слепок кода обновляется ежедневно. +Для навигации по коду онлайн доступен **Woboq**, он расположен [здесь](https://clickhouse.com/codebrowser/html_report///ClickHouse/src/index.html). В нём реализовано удобное перемещение между исходными файлами, семантическая подсветка, подсказки, индексация и поиск. Слепок кода обновляется ежедневно. Также вы можете просматривать исходники на [GitHub](https://github.com/ClickHouse/ClickHouse). diff --git a/docs/ru/development/build-osx.md b/docs/ru/development/build-osx.md index 8d5d06a544c..a1192b509df 100644 --- a/docs/ru/development/build-osx.md +++ b/docs/ru/development/build-osx.md @@ -74,7 +74,7 @@ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/ $ rm -rf build $ mkdir build $ cd build - $ cmake -DCMAKE_C_COMPILER=$(brew --prefix gcc)/bin/gcc-10 -DCMAKE_CXX_COMPILER=$(brew --prefix gcc)/bin/g++-10 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_JEMALLOC=OFF .. + $ cmake -DCMAKE_C_COMPILER=$(brew --prefix gcc)/bin/gcc-11 -DCMAKE_CXX_COMPILER=$(brew --prefix gcc)/bin/g++-11 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_JEMALLOC=OFF .. $ cmake --build . --config RelWithDebInfo $ cd .. ``` @@ -122,4 +122,4 @@ $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/ 4. Чтобы проверить, как это работает, выполните команду `ulimit -n`. -[Original article](https://clickhouse.tech/docs/en/development/build_osx/) +[Original article](https://clickhouse.com/docs/en/development/build_osx/) diff --git a/docs/ru/development/continuous-integration.md b/docs/ru/development/continuous-integration.md new file mode 120000 index 00000000000..f68058a436e --- /dev/null +++ b/docs/ru/development/continuous-integration.md @@ -0,0 +1 @@ +../../en/development/continuous-integration.md \ No newline at end of file diff --git a/docs/ru/development/contrib.md b/docs/ru/development/contrib.md index 33a533d7f75..3d6e5e4cb1b 100644 --- a/docs/ru/development/contrib.md +++ b/docs/ru/development/contrib.md @@ -4,40 +4,95 @@ toc_title: "Используемые сторонние библиотеки" --- -# Используемые сторонние библиотеки {#ispolzuemye-storonnie-biblioteki} +# Используемые сторонние библиотеки {#third-party-libraries-used} -| Библиотека | Лицензия | -|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------| -| base64 | [BSD 2-Clause License](https://github.com/aklomp/base64/blob/a27c565d1b6c676beaf297fe503c4518185666f7/LICENSE) | -| boost | [Boost Software License 1.0](https://github.com/ClickHouse-Extras/boost-extra/blob/6883b40449f378019aec792f9983ce3afc7ff16e/LICENSE_1_0.txt) | -| brotli | [MIT](https://github.com/google/brotli/blob/master/LICENSE) | -| capnproto | [MIT](https://github.com/capnproto/capnproto/blob/master/LICENSE) | -| cctz | [Apache License 2.0](https://github.com/google/cctz/blob/4f9776a310f4952454636363def82c2bf6641d5f/LICENSE.txt) | -| double-conversion | [BSD 3-Clause License](https://github.com/google/double-conversion/blob/cf2f0f3d547dc73b4612028a155b80536902ba02/LICENSE) | -| FastMemcpy | [MIT](https://github.com/ClickHouse/ClickHouse/blob/master/libs/libmemcpy/impl/LICENSE) | -| googletest | [BSD 3-Clause License](https://github.com/google/googletest/blob/master/LICENSE) | -| h3 | [Apache License 2.0](https://github.com/uber/h3/blob/master/LICENSE) | -| hyperscan | [BSD 3-Clause License](https://github.com/intel/hyperscan/blob/master/LICENSE) | -| libcxxabi | [BSD + MIT](https://github.com/ClickHouse/ClickHouse/blob/master/libs/libglibc-compatibility/libcxxabi/LICENSE.TXT) | -| libdivide | [Zlib License](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libdivide/LICENSE.txt) | -| libgsasl | [LGPL v2.1](https://github.com/ClickHouse-Extras/libgsasl/blob/3b8948a4042e34fb00b4fb987535dc9e02e39040/LICENSE) | -| libhdfs3 | [Apache License 2.0](https://github.com/ClickHouse-Extras/libhdfs3/blob/bd6505cbb0c130b0db695305b9a38546fa880e5a/LICENSE.txt) | -| libmetrohash | [Apache License 2.0](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libmetrohash/LICENSE) | -| libpcg-random | [Apache License 2.0](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libpcg-random/LICENSE-APACHE.txt) | -| libressl | [OpenSSL License](https://github.com/ClickHouse-Extras/ssl/blob/master/COPYING) | -| librdkafka | [BSD 2-Clause License](https://github.com/edenhill/librdkafka/blob/363dcad5a23dc29381cc626620e68ae418b3af19/LICENSE) | -| libwidechar_width | [CC0 1.0 Universal](https://github.com/ClickHouse/ClickHouse/blob/master/libs/libwidechar_width/LICENSE) | -| llvm | [BSD 3-Clause License](https://github.com/ClickHouse-Extras/llvm/blob/163def217817c90fb982a6daf384744d8472b92b/llvm/LICENSE.TXT) | -| lz4 | [BSD 2-Clause License](https://github.com/lz4/lz4/blob/c10863b98e1503af90616ae99725ecd120265dfb/LICENSE) | -| mariadb-connector-c | [LGPL v2.1](https://github.com/ClickHouse-Extras/mariadb-connector-c/blob/3.1/COPYING.LIB) | -| murmurhash | [Public Domain](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/murmurhash/LICENSE) | -| pdqsort | [Zlib License](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/pdqsort/license.txt) | -| poco | [Boost Software License - Version 1.0](https://github.com/ClickHouse-Extras/poco/blob/fe5505e56c27b6ecb0dcbc40c49dc2caf4e9637f/LICENSE) | -| protobuf | [BSD 3-Clause License](https://github.com/ClickHouse-Extras/protobuf/blob/12735370922a35f03999afff478e1c6d7aa917a4/LICENSE) | -| re2 | [BSD 3-Clause License](https://github.com/google/re2/blob/7cf8b88e8f70f97fd4926b56aa87e7f53b2717e0/LICENSE) | -| UnixODBC | [LGPL v2.1](https://github.com/ClickHouse-Extras/UnixODBC/tree/b0ad30f7f6289c12b76f04bfb9d466374bb32168) | -| zlib-ng | [Zlib License](https://github.com/ClickHouse-Extras/zlib-ng/blob/develop/LICENSE.md) | -| zstd | [BSD 3-Clause License](https://github.com/facebook/zstd/blob/dev/LICENSE) | +Список сторонних библиотек: + +| Библиотека | Тип лицензии | +|:-|:-| +| abseil-cpp | [Apache](https://github.com/ClickHouse-Extras/abseil-cpp/blob/4f3b686f86c3ebaba7e4e926e62a79cb1c659a54/LICENSE) | +| AMQP-CPP | [Apache](https://github.com/ClickHouse-Extras/AMQP-CPP/blob/1a6c51f4ac51ac56610fa95081bd2f349911375a/LICENSE) | +| arrow | [Apache](https://github.com/ClickHouse-Extras/arrow/blob/078e21bad344747b7656ef2d7a4f7410a0a303eb/LICENSE.txt) | +| avro | [Apache](https://github.com/ClickHouse-Extras/avro/blob/e43c46e87fd32eafdc09471e95344555454c5ef8/LICENSE.txt) | +| aws | [Apache](https://github.com/ClickHouse-Extras/aws-sdk-cpp/blob/7d48b2c8193679cc4516e5bd68ae4a64b94dae7d/LICENSE.txt) | +| aws-c-common | [Apache](https://github.com/ClickHouse-Extras/aws-c-common/blob/736a82d1697c108b04a277e66438a7f4e19b6857/LICENSE) | +| aws-c-event-stream | [Apache](https://github.com/ClickHouse-Extras/aws-c-event-stream/blob/3bc33662f9ccff4f4cbcf9509cc78c26e022fde0/LICENSE) | +| aws-checksums | [Apache](https://github.com/ClickHouse-Extras/aws-checksums/blob/519d6d9093819b6cf89ffff589a27ef8f83d0f65/LICENSE) | +| base64 | [BSD 2-clause](https://github.com/ClickHouse-Extras/Turbo-Base64/blob/af9b331f2b4f30b41c70f3a571ff904a8251c1d3/LICENSE) | +| boost | [Boost](https://github.com/ClickHouse-Extras/boost/blob/9cf09dbfd55a5c6202dedbdf40781a51b02c2675/LICENSE_1_0.txt) | +| boringssl | [BSD](https://github.com/ClickHouse-Extras/boringssl/blob/a6a2e2ab3e44d97ce98e51c558e989f211de7eb3/LICENSE) | +| brotli | [MIT](https://github.com/google/brotli/blob/63be8a99401992075c23e99f7c84de1c653e39e2/LICENSE) | +| capnproto | [MIT](https://github.com/capnproto/capnproto/blob/a00ccd91b3746ef2ab51d40fe3265829949d1ace/LICENSE) | +| cassandra | [Apache](https://github.com/ClickHouse-Extras/cpp-driver/blob/eb9b68dadbb4417a2c132ad4a1c2fa76e65e6fc1/LICENSE.txt) | +| cctz | [Apache](https://github.com/ClickHouse-Extras/cctz/blob/c0f1bcb97fd2782f7c3f972fadd5aad5affac4b8/LICENSE.txt) | +| cityhash102 | [MIT](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/cityhash102/COPYING) | +| cppkafka | [BSD 2-clause](https://github.com/mfontanini/cppkafka/blob/5a119f689f8a4d90d10a9635e7ee2bee5c127de1/LICENSE) | +| croaring | [Apache](https://github.com/RoaringBitmap/CRoaring/blob/2c867e9f9c9e2a3a7032791f94c4c7ae3013f6e0/LICENSE) | +| curl | [Apache](https://github.com/curl/curl/blob/3b8bbbbd1609c638a3d3d0acb148a33dedb67be3/docs/LICENSE-MIXING.md) | +| cyrus-sasl | [BSD 2-clause](https://github.com/ClickHouse-Extras/cyrus-sasl/blob/e6466edfd638cc5073debe941c53345b18a09512/COPYING) | +| double-conversion | [BSD 3-clause](https://github.com/google/double-conversion/blob/cf2f0f3d547dc73b4612028a155b80536902ba02/LICENSE) | +| dragonbox | [Apache](https://github.com/ClickHouse-Extras/dragonbox/blob/923705af6fd953aa948fc175f6020b15f7359838/LICENSE-Apache2-LLVM) | +| fast_float | [Apache](https://github.com/fastfloat/fast_float/blob/7eae925b51fd0f570ccd5c880c12e3e27a23b86f/LICENSE) | +| fastops | [MIT](https://github.com/ClickHouse-Extras/fastops/blob/88752a5e03cf34639a4a37a4b41d8b463fffd2b5/LICENSE) | +| flatbuffers | [Apache](https://github.com/ClickHouse-Extras/flatbuffers/blob/eb3f827948241ce0e701516f16cd67324802bce9/LICENSE.txt) | +| fmtlib | [Unknown](https://github.com/fmtlib/fmt/blob/c108ee1d590089ccf642fc85652b845924067af2/LICENSE.rst) | +| gcem | [Apache](https://github.com/kthohr/gcem/blob/8d4f1b5d76ea8f6ff12f3f4f34cda45424556b00/LICENSE) | +| googletest | [BSD 3-clause](https://github.com/google/googletest/blob/e7e591764baba0a0c3c9ad0014430e7a27331d16/LICENSE) | +| grpc | [Apache](https://github.com/ClickHouse-Extras/grpc/blob/60c986e15cae70aade721d26badabab1f822fdd6/LICENSE) | +| h3 | [Apache](https://github.com/ClickHouse-Extras/h3/blob/c7f46cfd71fb60e2fefc90e28abe81657deff735/LICENSE) | +| hyperscan | [Boost](https://github.com/ClickHouse-Extras/hyperscan/blob/e9f08df0213fc637aac0a5bbde9beeaeba2fe9fa/LICENSE) | +| icu | [Public Domain](https://github.com/unicode-org/icu/blob/faa2f9f9e1fe74c5ed00eba371d2830134cdbea1/icu4c/LICENSE) | +| icudata | [Public Domain](https://github.com/ClickHouse-Extras/icudata/blob/f020820388e3faafb44cc643574a2d563dfde572/LICENSE) | +| jemalloc | [BSD 2-clause](https://github.com/ClickHouse-Extras/jemalloc/blob/e6891d9746143bf2cf617493d880ba5a0b9a3efd/COPYING) | +| krb5 | [MIT](https://github.com/ClickHouse-Extras/krb5/blob/5149dea4e2be0f67707383d2682b897c14631374/src/lib/gssapi/LICENSE) | +| libc-headers | [LGPL](https://github.com/ClickHouse-Extras/libc-headers/blob/a720b7105a610acbd7427eea475a5b6810c151eb/LICENSE) | +| libcpuid | [BSD 2-clause](https://github.com/ClickHouse-Extras/libcpuid/blob/8db3b8d2d32d22437f063ce692a1b9bb15e42d18/COPYING) | +| libcxx | [Apache](https://github.com/ClickHouse-Extras/libcxx/blob/2fa892f69acbaa40f8a18c6484854a6183a34482/LICENSE.TXT) | +| libcxxabi | [Apache](https://github.com/ClickHouse-Extras/libcxxabi/blob/df8f1e727dbc9e2bedf2282096fa189dc3fe0076/LICENSE.TXT) | +| libdivide | [zLib](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libdivide/LICENSE.txt) | +| libfarmhash | [MIT](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libfarmhash/COPYING) | +| libgsasl | [LGPL](https://github.com/ClickHouse-Extras/libgsasl/blob/383ee28e82f69fa16ed43b48bd9c8ee5b313ab84/LICENSE) | +| libhdfs3 | [Apache](https://github.com/ClickHouse-Extras/libhdfs3/blob/095b9d48b400abb72d967cb0539af13b1e3d90cf/LICENSE.txt) | +| libmetrohash | [Apache](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/libmetrohash/LICENSE) | +| libpq | [Unknown](https://github.com/ClickHouse-Extras/libpq/blob/e071ea570f8985aa00e34f5b9d50a3cfe666327e/COPYRIGHT) | +| libpqxx | [BSD 3-clause](https://github.com/ClickHouse-Extras/libpqxx/blob/357608d11b7a1961c3fb7db2ef9a5dbb2e87da77/COPYING) | +| librdkafka | [MIT](https://github.com/ClickHouse-Extras/librdkafka/blob/b8554f1682062c85ba519eb54ef2f90e02b812cb/LICENSE.murmur2) | +| libunwind | [Apache](https://github.com/ClickHouse-Extras/libunwind/blob/6b816d2fba3991f8fd6aaec17d92f68947eab667/LICENSE.TXT) | +| libuv | [BSD](https://github.com/ClickHouse-Extras/libuv/blob/e2e9b7e9f978ce8a1367b5fe781d97d1ce9f94ab/LICENSE) | +| llvm | [Apache](https://github.com/ClickHouse-Extras/llvm/blob/e5751459412bce1391fb7a2e9bbc01e131bf72f1/llvm/LICENSE.TXT) | +| lz4 | [BSD](https://github.com/lz4/lz4/blob/f39b79fb02962a1cd880bbdecb6dffba4f754a11/LICENSE) | +| mariadb-connector-c | [LGPL](https://github.com/ClickHouse-Extras/mariadb-connector-c/blob/5f4034a3a6376416504f17186c55fe401c6d8e5e/COPYING.LIB) | +| miniselect | [Boost](https://github.com/danlark1/miniselect/blob/be0af6bd0b6eb044d1acc4f754b229972d99903a/LICENSE_1_0.txt) | +| msgpack-c | [Boost](https://github.com/msgpack/msgpack-c/blob/46684265d50b5d1b062d4c5c428ba08462844b1d/LICENSE_1_0.txt) | +| murmurhash | [Public Domain](https://github.com/ClickHouse/ClickHouse/blob/master/contrib/murmurhash/LICENSE) | +| NuRaft | [Apache](https://github.com/ClickHouse-Extras/NuRaft/blob/7ecb16844af6a9c283ad432d85ecc2e7d1544676/LICENSE) | +| openldap | [Unknown](https://github.com/ClickHouse-Extras/openldap/blob/0208811b6043ca06fda8631a5e473df1ec515ccb/LICENSE) | +| orc | [Apache](https://github.com/ClickHouse-Extras/orc/blob/0a936f6bbdb9303308973073f8623b5a8d82eae1/LICENSE) | +| poco | [Boost](https://github.com/ClickHouse-Extras/poco/blob/7351c4691b5d401f59e3959adfc5b4fa263b32da/LICENSE) | +| protobuf | [BSD 3-clause](https://github.com/ClickHouse-Extras/protobuf/blob/75601841d172c73ae6bf4ce8121f42b875cdbabd/LICENSE) | +| rapidjson | [MIT](https://github.com/ClickHouse-Extras/rapidjson/blob/c4ef90ccdbc21d5d5a628d08316bfd301e32d6fa/bin/jsonschema/LICENSE) | +| re2 | [BSD 3-clause](https://github.com/google/re2/blob/13ebb377c6ad763ca61d12dd6f88b1126bd0b911/LICENSE) | +| replxx | [BSD 3-clause](https://github.com/ClickHouse-Extras/replxx/blob/c81be6c68b146f15f2096b7ef80e3f21fe27004c/LICENSE.md) | +| rocksdb | [BSD 3-clause](https://github.com/ClickHouse-Extras/rocksdb/blob/b6480c69bf3ab6e298e0d019a07fd4f69029b26a/LICENSE.leveldb) | +| s2geometry | [Apache](https://github.com/ClickHouse-Extras/s2geometry/blob/20ea540d81f4575a3fc0aea585aac611bcd03ede/LICENSE) | +| sentry-native | [MIT](https://github.com/ClickHouse-Extras/sentry-native/blob/94644e92f0a3ff14bd35ed902a8622a2d15f7be4/LICENSE) | +| simdjson | [Apache](https://github.com/simdjson/simdjson/blob/8df32cea3359cb30120795da6020b3b73da01d38/LICENSE) | +| snappy | [Public Domain](https://github.com/google/snappy/blob/3f194acb57e0487531c96b97af61dcbd025a78a3/COPYING) | +| sparsehash-c11 | [BSD 3-clause](https://github.com/sparsehash/sparsehash-c11/blob/cf0bffaa456f23bc4174462a789b90f8b6f5f42f/LICENSE) | +| stats | [Apache](https://github.com/kthohr/stats/blob/b6dd459c10a88c7ea04693c007e9e35820c5d9ad/LICENSE) | +| thrift | [Apache](https://github.com/apache/thrift/blob/010ccf0a0c7023fea0f6bf4e4078ebdff7e61982/LICENSE) | +| unixodbc | [LGPL](https://github.com/ClickHouse-Extras/UnixODBC/blob/b0ad30f7f6289c12b76f04bfb9d466374bb32168/COPYING) | +| xz | [Public Domain](https://github.com/xz-mirror/xz/blob/869b9d1b4edd6df07f819d360d306251f8147353/COPYING) | +| zlib-ng | [zLib](https://github.com/ClickHouse-Extras/zlib-ng/blob/6a5e93b9007782115f7f7e5235dedc81c4f1facb/LICENSE.md) | +| zstd | [BSD](https://github.com/facebook/zstd/blob/a488ba114ec17ea1054b9057c26a046fc122b3b6/LICENSE) | + +Список всех сторонних библиотек можно получить с помощью запроса: + +``` sql +SELECT library_name, license_type, license_path FROM system.licenses ORDER BY library_name COLLATE 'en'; +``` + +[Пример](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIGxpYnJhcnlfbmFtZSwgbGljZW5zZV90eXBlLCBsaWNlbnNlX3BhdGggRlJPTSBzeXN0ZW0ubGljZW5zZXMgT1JERVIgQlkgbGlicmFyeV9uYW1lIENPTExBVEUgJ2VuJw==) ## Рекомендации по добавлению сторонних библиотек и поддержанию в них пользовательских изменений {#adding-third-party-libraries} diff --git a/docs/ru/development/developer-instruction.md b/docs/ru/development/developer-instruction.md index c568db4731f..215a13a465e 100644 --- a/docs/ru/development/developer-instruction.md +++ b/docs/ru/development/developer-instruction.md @@ -251,13 +251,13 @@ sudo ./llvm.sh 12 ## Написание кода {#napisanie-koda} -Описание архитектуры ClickHouse: https://clickhouse.tech/docs/ru/development/architecture/ +Описание архитектуры ClickHouse: https://clickhouse.com/docs/ru/development/architecture/ -Стиль кода: https://clickhouse.tech/docs/ru/development/style/ +Стиль кода: https://clickhouse.com/docs/ru/development/style/ -Рекомендации по добавлению сторонних библиотек и поддержанию в них пользовательских изменений: https://clickhouse.tech/docs/ru/development/contrib/#adding-third-party-libraries +Рекомендации по добавлению сторонних библиотек и поддержанию в них пользовательских изменений: https://clickhouse.com/docs/ru/development/contrib/#adding-third-party-libraries -Разработка тестов: https://clickhouse.tech/docs/ru/development/tests/ +Разработка тестов: https://clickhouse.com/docs/ru/development/tests/ Список задач: https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+task%22 @@ -267,8 +267,8 @@ sudo ./llvm.sh 12 sudo apt install wget xz-utils - wget https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz - wget https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz + wget https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz + wget https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz xz -v -d hits_v1.tsv.xz xz -v -d visits_v1.tsv.xz diff --git a/docs/ru/engines/database-engines/materialized-mysql.md b/docs/ru/engines/database-engines/materialized-mysql.md index 1cd864c01e9..4073df7b7ec 100644 --- a/docs/ru/engines/database-engines/materialized-mysql.md +++ b/docs/ru/engines/database-engines/materialized-mysql.md @@ -194,4 +194,4 @@ SELECT * FROM mysql.test; └───┴─────┴──────┘ ``` -[Оригинальная статья](https://clickhouse.tech/docs/ru/engines/database-engines/materialized-mysql/) +[Оригинальная статья](https://clickhouse.com/docs/ru/engines/database-engines/materialized-mysql/) diff --git a/docs/ru/engines/database-engines/postgresql.md b/docs/ru/engines/database-engines/postgresql.md index 06e2b35b002..092abaf0b4d 100644 --- a/docs/ru/engines/database-engines/postgresql.md +++ b/docs/ru/engines/database-engines/postgresql.md @@ -15,7 +15,7 @@ toc_title: PostgreSQL ``` sql CREATE DATABASE test_database -ENGINE = PostgreSQL('host:port', 'database', 'user', 'password'[, `use_table_cache`]); +ENGINE = PostgreSQL('host:port', 'database', 'user', 'password'[, `schema`, `use_table_cache`]); ``` **Параметры движка** @@ -24,6 +24,7 @@ ENGINE = PostgreSQL('host:port', 'database', 'user', 'password'[, `use_table_cac - `database` — имя удаленной БД. - `user` — пользователь PostgreSQL. - `password` — пароль пользователя. + - `schema` — схема PostgreSQL. - `use_table_cache` — определяет кеширование структуры таблиц БД. Необязательный параметр. Значение по умолчанию: `0`. ## Поддерживаемые типы данных {#data_types-support} @@ -135,4 +136,4 @@ DESCRIBE TABLE test_database.test_table; └────────┴───────────────────┘ ``` -[Оригинальная статья](https://clickhouse.tech/docs/ru/database-engines/postgresql/) +[Оригинальная статья](https://clickhouse.com/docs/ru/database-engines/postgresql/) diff --git a/docs/ru/engines/database-engines/sqlite.md b/docs/ru/engines/database-engines/sqlite.md new file mode 100644 index 00000000000..987ac187429 --- /dev/null +++ b/docs/ru/engines/database-engines/sqlite.md @@ -0,0 +1,79 @@ +--- +toc_priority: 32 +toc_title: SQLite +--- + +# SQLite {#sqlite} + +Движок баз данных позволяет подключаться к базе [SQLite](https://www.sqlite.org/index.html) и выполнять запросы `INSERT` и `SELECT` для обмена данными между ClickHouse и SQLite. + +## Создание базы данных {#creating-a-database} + +``` sql + CREATE DATABASE sqlite_database + ENGINE = SQLite('db_path') +``` + +**Параметры движка** + +- `db_path` — путь к файлу с базой данных SQLite. + +## Поддерживаемые типы данных {#data_types-support} + +| SQLite | ClickHouse | +|---------------|---------------------------------------------------------| +| INTEGER | [Int32](../../sql-reference/data-types/int-uint.md) | +| REAL | [Float32](../../sql-reference/data-types/float.md) | +| TEXT | [String](../../sql-reference/data-types/string.md) | +| BLOB | [String](../../sql-reference/data-types/string.md) | + +## Особенности и рекомендации {#specifics-and-recommendations} + +SQLite хранит всю базу данных (определения, таблицы, индексы и сами данные) в виде единого кроссплатформенного файла на хост-машине. Во время записи SQLite блокирует весь файл базы данных, поэтому операции записи выполняются последовательно. Операции чтения могут быть многозадачными. +SQLite не требует управления службами (например, сценариями запуска) или контроля доступа на основе `GRANT` и паролей. Контроль доступа осуществляется с помощью разрешений файловой системы, предоставляемых самому файлу базы данных. + +## Примеры использования {#usage-example} + +Отобразим список таблиц базы данных в ClickHouse, подключенной к SQLite: + +``` sql +CREATE DATABASE sqlite_db ENGINE = SQLite('sqlite.db'); +SHOW TABLES FROM sqlite_db; +``` + +``` text +┌──name───┐ +│ table1 │ +│ table2 │ +└─────────┘ +``` +Отобразим содержимое таблицы: + +``` sql +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` +Вставим данные в таблицу SQLite из таблицы ClickHouse: + +``` sql +CREATE TABLE clickhouse_table(`col1` String,`col2` Int16) ENGINE = MergeTree() ORDER BY col2; +INSERT INTO clickhouse_table VALUES ('text',10); +INSERT INTO sqlite_db.table1 SELECT * FROM clickhouse_table; +SELECT * FROM sqlite_db.table1; +``` + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +│ text │ 10 │ +└───────┴──────┘ +``` diff --git a/docs/ru/engines/table-engines/integrations/mongodb.md b/docs/ru/engines/table-engines/integrations/mongodb.md index 05820d03fe6..700377ac564 100644 --- a/docs/ru/engines/table-engines/integrations/mongodb.md +++ b/docs/ru/engines/table-engines/integrations/mongodb.md @@ -54,4 +54,4 @@ SELECT COUNT() FROM mongo_table; └─────────┘ ``` -[Original article](https://clickhouse.tech/docs/ru/engines/table-engines/integrations/mongodb/) +[Original article](https://clickhouse.com/docs/ru/engines/table-engines/integrations/mongodb/) diff --git a/docs/ru/engines/table-engines/integrations/postgresql.md b/docs/ru/engines/table-engines/integrations/postgresql.md index b2b0db3067a..e19527415bc 100644 --- a/docs/ru/engines/table-engines/integrations/postgresql.md +++ b/docs/ru/engines/table-engines/integrations/postgresql.md @@ -148,4 +148,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [Табличная функция `postgresql`](../../../sql-reference/table-functions/postgresql.md) - [Использование PostgreSQL в качестве источника для внешнего словаря](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-postgresql) -[Оригинальная статья](https://clickhouse.tech/docs/ru/engines/table-engines/integrations/postgresql/) +[Оригинальная статья](https://clickhouse.com/docs/ru/engines/table-engines/integrations/postgresql/) diff --git a/docs/ru/engines/table-engines/integrations/s3.md b/docs/ru/engines/table-engines/integrations/s3.md index 5895bd43d2f..c90b7293e1c 100644 --- a/docs/ru/engines/table-engines/integrations/s3.md +++ b/docs/ru/engines/table-engines/integrations/s3.md @@ -151,4 +151,4 @@ ENGINE = S3('https://storage.yandexcloud.net/my-test-bucket-768/big_prefix/file- **Смотрите также** -- [Табличная функция S3](../../../sql-reference/table-functions/s3.md) +- [Табличная функция s3](../../../sql-reference/table-functions/s3.md) diff --git a/docs/ru/engines/table-engines/integrations/sqlite.md b/docs/ru/engines/table-engines/integrations/sqlite.md new file mode 100644 index 00000000000..825b49cfde6 --- /dev/null +++ b/docs/ru/engines/table-engines/integrations/sqlite.md @@ -0,0 +1,59 @@ +--- +toc_priority: 7 +toc_title: SQLite +--- + +# SQLite {#sqlite} + +Движок позволяет импортировать и экспортировать данные из SQLite, а также поддерживает отправку запросов к таблицам SQLite напрямую из ClickHouse. + +## Создание таблицы {#creating-a-table} + +``` sql + CREATE TABLE [IF NOT EXISTS] [db.]table_name + ( + name1 [type1], + name2 [type2], ... + ) ENGINE = SQLite('db_path', 'table') +``` + +**Параметры движка** + +- `db_path` — путь к файлу с базой данных SQLite. +- `table` — имя таблицы в базе данных SQLite. + +## Примеры использования {#usage-example} + +Отобразим запрос, с помощью которого была создана таблица SQLite: + +```sql +SHOW CREATE TABLE sqlite_db.table2; +``` + +``` text +CREATE TABLE SQLite.table2 +( + `col1` Nullable(Int32), + `col2` Nullable(String) +) +ENGINE = SQLite('sqlite.db','table2'); +``` + +Получим данные из таблицы: + +``` sql +SELECT * FROM sqlite_db.table2 ORDER BY col1; +``` + +```text +┌─col1─┬─col2──┐ +│ 1 │ text1 │ +│ 2 │ text2 │ +│ 3 │ text3 │ +└──────┴───────┘ +``` + +**См. также** + +- [SQLite](../../../engines/database-engines/sqlite.md) движок баз данных +- [sqlite](../../../sql-reference/table-functions/sqlite.md) табличная функция diff --git a/docs/ru/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/ru/engines/table-engines/mergetree-family/graphitemergetree.md index fab796b8413..9cd8eda0b87 100644 --- a/docs/ru/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/ru/engines/table-engines/mergetree-family/graphitemergetree.md @@ -171,4 +171,4 @@ default !!! warning "Внимание" - Прореживание данных производится во время слияний. Обычно для старых партций слияния не запускаются, поэтому для прореживания надо иницировать незапланированное слияние используя [optimize](../../../sql-reference/statements/optimize.md). Или использовать дополнительные инструменты, например [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer). + Прореживание данных производится во время слияний. Обычно для старых партиций слияния не запускаются, поэтому для прореживания надо инициировать незапланированное слияние используя [optimize](../../../sql-reference/statements/optimize.md). Или использовать дополнительные инструменты, например [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer). diff --git a/docs/ru/engines/table-engines/mergetree-family/mergetree.md b/docs/ru/engines/table-engines/mergetree-family/mergetree.md index e688d726554..e8152441101 100644 --- a/docs/ru/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/ru/engines/table-engines/mergetree-family/mergetree.md @@ -86,7 +86,9 @@ ORDER BY expr - `enable_mixed_granularity_parts` — включает или выключает переход к ограничению размера гранул с помощью настройки `index_granularity_bytes`. Настройка `index_granularity_bytes` улучшает производительность ClickHouse при выборке данных из таблиц с большими (десятки и сотни мегабайтов) строками. Если у вас есть таблицы с большими строками, можно включить эту настройку, чтобы повысить эффективность запросов `SELECT`. - `use_minimalistic_part_header_in_zookeeper` — Способ хранения заголовков кусков данных в ZooKeeper. Если `use_minimalistic_part_header_in_zookeeper = 1`, то ZooKeeper хранит меньше данных. Подробнее читайте в [описании настройки](../../../operations/server-configuration-parameters/settings.md#server-settings-use_minimalistic_part_header_in_zookeeper) в разделе "Конфигурационные параметры сервера". - `min_merge_bytes_to_use_direct_io` — минимальный объём данных при слиянии, необходимый для прямого (небуферизованного) чтения/записи (direct I/O) на диск. При слиянии частей данных ClickHouse вычисляет общий объём хранения всех данных, подлежащих слиянию. Если общий объём хранения всех данных для чтения превышает `min_bytes_to_use_direct_io` байт, тогда ClickHouse использует флаг `O_DIRECT` при чтении данных с диска. Если `min_merge_bytes_to_use_direct_io = 0`, тогда прямой ввод-вывод отключен. Значение по умолчанию: `10 * 1024 * 1024 * 1024` байтов. - - `merge_with_ttl_timeout` — минимальное время в секундах перед повторным слиянием с TTL. По умолчанию — 86400 (1 день). + - `merge_with_ttl_timeout` — минимальное время в секундах перед повторным слиянием для удаления данных с истекшим TTL. По умолчанию: `14400` секунд (4 часа). + - `merge_with_recompression_ttl_timeout` — минимальное время в секундах перед повторным слиянием для повторного сжатия данных с истекшим TTL. По умолчанию: `14400` секунд (4 часа). + - `try_fetch_recompressed_part_timeout` — время ожидания (в секундах) перед началом слияния с повторным сжатием. В течение этого времени ClickHouse пытается извлечь сжатую часть из реплики, которая назначила это слияние. Значение по умолчанию: `7200` секунд (2 часа). - `write_final_mark` — включает или отключает запись последней засечки индекса в конце куска данных, указывающей за последний байт. По умолчанию — 1. Не отключайте её. - `merge_max_block_size` — максимальное количество строк в блоке для операций слияния. Значение по умолчанию: 8192. - `storage_policy` — политика хранения данных. Смотрите [Хранение данных таблицы на нескольких блочных устройствах](#table_engine-mergetree-multiple-volumes). @@ -375,23 +377,33 @@ INDEX b (u64 * length(str), i32 + f64 * 100, date, str) TYPE set(100) GRANULARIT - `s != 1` - `NOT startsWith(s, 'test')` -### Проекции {#projections} -Проекции похожи на материализованные представления, но определяются на уровне партов. Это обеспечивает гарантии согласованности наряду с автоматическим использованием в запросах. +## Проекции {#projections} +Проекции похожи на [материализованные представления](../../../sql-reference/statements/create/view.md#materialized), но определяются на уровне кусков данных. Это обеспечивает гарантии согласованности данных наряду с автоматическим использованием в запросах. -#### Запрос {#projection-query} -Запрос проекции — это то, что определяет проекцию. Он имеет следующую грамматику: +Проекции — это экспериментальная возможность. Чтобы включить поддержку проекций, установите настройку [allow_experimental_projection_optimization](../../../operations/settings/settings.md#allow-experimental-projection-optimization) в значение `1`. См. также настройку [force_optimize_projection ](../../../operations/settings/settings.md#force-optimize-projection). -`SELECT [GROUP BY] [ORDER BY]` +Проекции не поддерживаются для запросов `SELECT` с модификатором [FINAL](../../../sql-reference/statements/select/from.md#select-from-final). -Он неявно выбирает данные из родительской таблицы. +### Запрос проекции {#projection-query} +Запрос проекции — это то, что определяет проекцию. Такой запрос неявно выбирает данные из родительской таблицы. +**Синтаксис** -#### Хранение {#projection-storage} -Проекции хранятся в каталоге парта. Это похоже на хранение индексов, но используется подкаталог, в котором хранится анонимный парт таблицы MergeTree. Таблица создается запросом определения проекции. Если есть конструкция GROUP BY, то базовый механизм хранения становится AggregatedMergeTree, а все агрегатные функции преобразуются в AggregateFunction. Если есть конструкция ORDER BY, таблица MergeTree будет использовать его в качестве выражения первичного ключа. Во время процесса слияния парт проекции будет слит с помощью процедуры слияния ее хранилища. Контрольная сумма парта родительской таблицы будет включать парт проекции. Другие процедуры аналогичны индексам пропуска данных. +```sql +SELECT [GROUP BY] [ORDER BY] +``` -#### Анализ запросов {#projection-query-analysis} -1. Проверить, можно ли использовать проекцию в данном запросе, то есть, что с ней выходит тот же результат, что и с запросом к базовой таблице. -2. Выбрать наиболее подходящее совпадение, содержащее наименьшее количество гранул для чтения. -3. План запроса, который использует проекции, будет отличаться от того, который использует исходные парты. При отсутствии проекции в некоторых партах можно расширить план, чтобы «проецировать» на лету. +Проекции можно изменить или удалить с помощью запроса [ALTER](../../../sql-reference/statements/alter/projection.md). + +### Хранение проекции {#projection-storage} +Проекции хранятся в каталоге куска данных. Это похоже на хранение индексов, но используется подкаталог, в котором хранится анонимный кусок таблицы `MergeTree`. Таблица создается запросом определения проекции. +Если присутствует секция `GROUP BY`, то используется движок [AggregatingMergeTree](aggregatingmergetree.md), а все агрегатные функции преобразуются в `AggregateFunction`. +Если присутствует секция `ORDER BY`, таблица `MergeTree` использует ее в качестве выражения для первичного ключа. +Во время процесса слияния кусок данных проекции объединяется с помощью процедуры слияния хранилища. Контрольная сумма куска данных родительской таблицы включает кусок данных проекции. Другие процедуры аналогичны индексам пропуска данных. + +### Анализ запросов {#projection-query-analysis} +1. Проверьте, можно ли использовать проекцию в данном запросе, то есть, что с ней получается тот же результат, что и с запросом к базовой таблице. +2. Выберите наиболее подходящее совпадение, содержащее наименьшее количество гранул для чтения. +3. План запроса, который использует проекции, отличается от того, который использует исходные куски данных. Если в некоторых кусках проекции отсутствуют, можно расширить план, чтобы «проецировать» на лету. ## Конкурентный доступ к данным {#concurrent-data-access} @@ -401,20 +413,22 @@ INDEX b (u64 * length(str), i32 + f64 * 100, date, str) TYPE set(100) GRANULARIT ## TTL для столбцов и таблиц {#table_engine-mergetree-ttl} -Определяет время жизни значений, а также правила перемещения данных на другой диск или том. +Определяет время жизни значений. -Секция `TTL` может быть установлена как для всей таблицы, так и для каждого отдельного столбца. Правила `TTL` для таблицы позволяют указать целевые диски или тома для фонового перемещения на них частей данных. +Секция `TTL` может быть установлена как для всей таблицы, так и для каждого отдельного столбца. Для таблиц можно установить правила `TTL` для фонового перемещения кусков данных на целевые диски или тома, или правила повторного сжатия кусков данных. Выражения должны возвращать тип [Date](../../../engines/table-engines/mergetree-family/mergetree.md) или [DateTime](../../../engines/table-engines/mergetree-family/mergetree.md). -Для задания времени жизни столбца, например: +**Синтаксис** + +Для задания времени жизни столбца: ``` sql TTL time_column TTL time_column + interval ``` -Чтобы задать `interval`, используйте операторы [интервала времени](../../../engines/table-engines/mergetree-family/mergetree.md#operators-datetime). +Чтобы задать `interval`, используйте операторы [интервала времени](../../../engines/table-engines/mergetree-family/mergetree.md#operators-datetime), например: ``` sql TTL date_time + INTERVAL 1 MONTH @@ -423,13 +437,13 @@ TTL date_time + INTERVAL 15 HOUR ### TTL столбца {#mergetree-column-ttl} -Когда срок действия значений в столбце истечет, ClickHouse заменит их значениями по умолчанию для типа данных столбца. Если срок действия всех значений столбцов в части данных истек, ClickHouse удаляет столбец из куска данных в файловой системе. +Когда срок действия значений в столбце истечёт, ClickHouse заменит их значениями по умолчанию для типа данных столбца. Если срок действия всех значений столбцов в части данных истек, ClickHouse удаляет столбец из куска данных в файловой системе. Секцию `TTL` нельзя использовать для ключевых столбцов. -Примеры: +**Примеры** -Создание таблицы с TTL +Создание таблицы с `TTL`: ``` sql CREATE TABLE example_table @@ -444,7 +458,7 @@ PARTITION BY toYYYYMM(d) ORDER BY d; ``` -Добавление TTL на колонку существующей таблицы +Добавление `TTL` на колонку существующей таблицы: ``` sql ALTER TABLE example_table @@ -452,7 +466,7 @@ ALTER TABLE example_table c String TTL d + INTERVAL 1 DAY; ``` -Изменение TTL у колонки +Изменение `TTL` у колонки: ``` sql ALTER TABLE example_table @@ -462,23 +476,24 @@ ALTER TABLE example_table ### TTL таблицы {#mergetree-table-ttl} -Для таблицы можно задать одно выражение для устаревания данных, а также несколько выражений, по срабатывании которых данные переместятся на [некоторый диск или том](#table_engine-mergetree-multiple-volumes). Когда некоторые данные в таблице устаревают, ClickHouse удаляет все соответствующие строки. +Для таблицы можно задать одно выражение для устаревания данных, а также несколько выражений, при срабатывании которых данные будут перемещены на [некоторый диск или том](#table_engine-mergetree-multiple-volumes). Когда некоторые данные в таблице устаревают, ClickHouse удаляет все соответствующие строки. Операции перемещения или повторного сжатия данных выполняются только когда устаревают все данные в куске. ``` sql TTL expr - [DELETE|TO DISK 'xxx'|TO VOLUME 'xxx'][, DELETE|TO DISK 'aaa'|TO VOLUME 'bbb'] ... + [DELETE|RECOMPRESS codec_name1|TO DISK 'xxx'|TO VOLUME 'xxx'][, DELETE|RECOMPRESS codec_name2|TO DISK 'aaa'|TO VOLUME 'bbb'] ... [WHERE conditions] [GROUP BY key_expr [SET v1 = aggr_func(v1) [, v2 = aggr_func(v2) ...]] ] ``` -За каждым TTL выражением может следовать тип действия, которое выполняется после достижения времени, соответствующего результату TTL выражения: +За каждым `TTL` выражением может следовать тип действия, которое выполняется после достижения времени, соответствующего результату `TTL` выражения: - `DELETE` - удалить данные (действие по умолчанию); +- `RECOMPRESS codec_name` - повторно сжать данные с помощью кодека `codec_name`; - `TO DISK 'aaa'` - переместить данные на диск `aaa`; - `TO VOLUME 'bbb'` - переместить данные на том `bbb`; - `GROUP BY` - агрегировать данные. -В секции `WHERE` можно задать условие удаления или агрегирования устаревших строк (для перемещения условие `WHERE` не применимо). +В секции `WHERE` можно задать условие удаления или агрегирования устаревших строк (для перемещения и сжатия условие `WHERE` не применимо). Колонки, по которым агрегируются данные в `GROUP BY`, должны являться префиксом первичного ключа таблицы. @@ -486,7 +501,7 @@ TTL expr **Примеры** -Создание таблицы с TTL: +Создание таблицы с `TTL`: ``` sql CREATE TABLE example_table @@ -502,7 +517,7 @@ TTL d + INTERVAL 1 MONTH [DELETE], d + INTERVAL 2 WEEK TO DISK 'bbb'; ``` -Изменение TTL: +Изменение `TTL`: ``` sql ALTER TABLE example_table @@ -523,6 +538,21 @@ ORDER BY d TTL d + INTERVAL 1 MONTH DELETE WHERE toDayOfWeek(d) = 1; ``` +Создание таблицы, в которой куски с устаревшими данными повторно сжимаются: + +```sql +CREATE TABLE table_for_recompression +( + d DateTime, + key UInt64, + value String +) ENGINE MergeTree() +ORDER BY tuple() +PARTITION BY key +TTL d + INTERVAL 1 MONTH RECOMPRESS CODEC(ZSTD(17)), d + INTERVAL 1 YEAR RECOMPRESS CODEC(LZ4HC(10)) +SETTINGS min_rows_for_wide_part = 0, min_bytes_for_wide_part = 0; +``` + Создание таблицы, где устаревшие строки агрегируются. В результирующих строках колонка `x` содержит максимальное значение по сгруппированным строкам, `y` — минимальное значение, а `d` — случайное значение из одной из сгуппированных строк. ``` sql @@ -539,14 +569,18 @@ ORDER BY (k1, k2) TTL d + INTERVAL 1 MONTH GROUP BY k1, k2 SET x = max(x), y = min(y); ``` -**Удаление данных** +### Удаление устаревших данных {#mergetree-removing-expired-data} -Данные с истекшим TTL удаляются, когда ClickHouse мёржит куски данных. +Данные с истекшим `TTL` удаляются, когда ClickHouse мёржит куски данных. Когда ClickHouse видит, что некоторые данные устарели, он выполняет внеплановые мёржи. Для управление частотой подобных мёржей, можно задать настройку `merge_with_ttl_timeout`. Если её значение слишком низкое, придется выполнять много внеплановых мёржей, которые могут начать потреблять значительную долю ресурсов сервера. Если вы выполните запрос `SELECT` между слияниями вы можете получить устаревшие данные. Чтобы избежать этого используйте запрос [OPTIMIZE](../../../engines/table-engines/mergetree-family/mergetree.md#misc_operations-optimize) перед `SELECT`. +**См. также** + +- настройку [ttl_only_drop_parts](../../../operations/settings/settings.md#ttl_only_drop_parts) + ## Хранение данных таблицы на нескольких блочных устройствах {#table_engine-mergetree-multiple-volumes} ### Введение {#introduction} diff --git a/docs/ru/engines/table-engines/mergetree-family/replication.md b/docs/ru/engines/table-engines/mergetree-family/replication.md index db749ba455e..a7c1a7d2d1b 100644 --- a/docs/ru/engines/table-engines/mergetree-family/replication.md +++ b/docs/ru/engines/table-engines/mergetree-family/replication.md @@ -253,4 +253,5 @@ $ sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data - [background_schedule_pool_size](../../../operations/settings/settings.md#background_schedule_pool_size) - [background_fetches_pool_size](../../../operations/settings/settings.md#background_fetches_pool_size) - [execute_merges_on_single_replica_time_threshold](../../../operations/settings/settings.md#execute-merges-on-single-replica-time-threshold) - +- [max_replicated_fetches_network_bandwidth](../../../operations/settings/merge-tree-settings.md#max_replicated_fetches_network_bandwidth) +- [max_replicated_sends_network_bandwidth](../../../operations/settings/merge-tree-settings.md#max_replicated_sends_network_bandwidth) diff --git a/docs/ru/faq/general/columnar-database.md b/docs/ru/faq/general/columnar-database.md index 5ed6185736d..3931051b2b7 100644 --- a/docs/ru/faq/general/columnar-database.md +++ b/docs/ru/faq/general/columnar-database.md @@ -17,9 +17,9 @@ toc_priority: 101 Ниже — иллюстрация того, как извлекаются данные для отчетов при использовании обычной строковой СУБД и столбцовой СУБД: **Стандартная строковая СУБД** -![Стандартная строковая СУБД](https://clickhouse.tech/docs/en/images/row-oriented.gif#) +![Стандартная строковая СУБД](/docs/en/images/row-oriented.gif#) **Столбцовая СУБД** -![Столбцовая СУБД](https://clickhouse.tech/docs/en/images/column-oriented.gif#) +![Столбцовая СУБД](/docs/en/images/column-oriented.gif#) Для аналитических приложений столбцовые СУБД предпочтительнее, так как в них можно хранить много столбцов в таблице просто на всякий случай, и это не будет сказываться на скорости чтения данных. Столбцовые СУБД предназначены для обработки и хранения больших данных. Они прекрасно масштабируются при помощи распределенных кластеров на относительно недорогих серверах — для увеличения производительности. В ClickHouse для этого используются [распределенные](../../engines/table-engines/special/distributed.md) и [реплицированные](../../engines/table-engines/mergetree-family/replication.md) таблицы. diff --git a/docs/ru/faq/general/index.md b/docs/ru/faq/general/index.md index cf105eaf8bb..cb30771aa49 100644 --- a/docs/ru/faq/general/index.md +++ b/docs/ru/faq/general/index.md @@ -21,4 +21,4 @@ toc_title: Общие вопросы !!! info "Если вы не нашли то, что искали:" Загляните в другие категории F.A.Q. или поищите в остальных разделах документации, ориентируясь по оглавлению слева. -[Original article](https://clickhouse.tech/docs/ru/faq/general/) +[Original article](https://clickhouse.com/docs/ru/faq/general/) diff --git a/docs/ru/faq/general/ne-tormozit.md b/docs/ru/faq/general/ne-tormozit.md index c1cf87d5b0c..35b6de72a67 100644 --- a/docs/ru/faq/general/ne-tormozit.md +++ b/docs/ru/faq/general/ne-tormozit.md @@ -22,4 +22,4 @@ toc_priority: 11 ![iframe](https://www.youtube.com/embed/bSyQahMVZ7w) -P.S. Эти футболки не продаются, а распространяются бесплатно на большинстве митапов [ClickHouse](https://clickhouse.tech/#meet), обычно в награду за самые интересные вопросы или другие виды активного участия. +P.S. Эти футболки не продаются, а распространяются бесплатно на большинстве митапов [ClickHouse](https://clickhouse.com/#meet), обычно в награду за самые интересные вопросы или другие виды активного участия. diff --git a/docs/ru/faq/integration/index.md b/docs/ru/faq/integration/index.md index fdb9039d066..54e7e2c8e40 100644 --- a/docs/ru/faq/integration/index.md +++ b/docs/ru/faq/integration/index.md @@ -16,4 +16,4 @@ toc_title: Интеграция !!! info "Если вы не нашли то, что искали" Загляните в другие подразделы F.A.Q. или поищите в остальных разделах документации, ориентируйтесь по оглавлению слева. -[Original article](https://clickhouse.tech/docs/ru/faq/integration/) +[Original article](https://clickhouse.com/docs/ru/faq/integration/) diff --git a/docs/ru/faq/operations/index.md b/docs/ru/faq/operations/index.md index 723ae2d10d3..53fda842472 100644 --- a/docs/ru/faq/operations/index.md +++ b/docs/ru/faq/operations/index.md @@ -15,4 +15,4 @@ toc_title: Операции !!! info "Если вы не нашли то, что искали" Загляните в другие подразделы F.A.Q. или поищите в остальных разделах документации, ориентируйтесь по оглавлению слева. -[Original article](https://clickhouse.tech/docs/en/faq/operations/) +[Original article](https://clickhouse.com/docs/en/faq/operations/) diff --git a/docs/ru/faq/use-cases/time-series.md b/docs/ru/faq/use-cases/time-series.md index ea56660cc10..5b46de78274 100644 --- a/docs/ru/faq/use-cases/time-series.md +++ b/docs/ru/faq/use-cases/time-series.md @@ -6,7 +6,7 @@ toc_priority: 101 # Можно ли использовать ClickHouse как базу данных временных рядов? {#can-i-use-clickhouse-as-a-time-series-database} -ClickHouse — это универсальное решение для [OLAP](../../faq/general/olap.md) операций, в то время как существует много специализированных СУБД временных рядов. Однако [высокая скорость выполнения запросов](../../faq/general/why-clickhouse-is-so-fast.md) позволяет CLickHouse во многих случаях "побеждать" специализированные аналоги. В подтверждение этому есть много [примеров](https://medium.com/@AltinityDB/clickhouse-for-time-series-scalability-benchmarks-e181132a895b) с конкретными показателями производительности, так что мы не будем останавливаться на этом подробно. Лучше рассмотрим те возможности ClickHouse, которые стоит использовать. +ClickHouse — это универсальное решение для [OLAP](../../faq/general/olap.md) операций, в то время как существует много специализированных СУБД временных рядов. Однако [высокая скорость выполнения запросов](../../faq/general/why-clickhouse-is-so-fast.md) позволяет CLickHouse во многих случаях "побеждать" специализированные аналоги. В подтверждение этому есть много примеров с конкретными показателями производительности, так что мы не будем останавливаться на этом подробно. Лучше рассмотрим те возможности ClickHouse, которые стоит использовать. Во-первых, есть **[специальные кодеки](../../sql-reference/statements/create/table.md#create-query-specialized-codecs)**, которые составляют типичные временные ряды. Это могут быть либо стандартные алгоритмы, такие как `DoubleDelta` или `Gorilla`, либо специфические для ClickHouse, например `T64`. diff --git a/docs/ru/getting-started/example-datasets/brown-benchmark.md b/docs/ru/getting-started/example-datasets/brown-benchmark.md index f1aad06b743..7f357c74368 100644 --- a/docs/ru/getting-started/example-datasets/brown-benchmark.md +++ b/docs/ru/getting-started/example-datasets/brown-benchmark.md @@ -9,7 +9,7 @@ toc_title: Brown University Benchmark Скачать данные: ``` -wget https://datasets.clickhouse.tech/mgbench{1..3}.csv.xz +wget https://datasets.clickhouse.com/mgbench{1..3}.csv.xz ``` Распаковать данные: @@ -411,5 +411,5 @@ ORDER BY yr, mo; ``` -Данные также доступны для работы с интерактивными запросами через [Playground](https://gh-api.clickhouse.tech/play?user=play), [пример](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIG1hY2hpbmVfbmFtZSwKICAgICAgIE1JTihjcHUpIEFTIGNwdV9taW4sCiAgICAgICBNQVgoY3B1KSBBUyBjcHVfbWF4LAogICAgICAgQVZHKGNwdSkgQVMgY3B1X2F2ZywKICAgICAgIE1JTihuZXRfaW4pIEFTIG5ldF9pbl9taW4sCiAgICAgICBNQVgobmV0X2luKSBBUyBuZXRfaW5fbWF4LAogICAgICAgQVZHKG5ldF9pbikgQVMgbmV0X2luX2F2ZywKICAgICAgIE1JTihuZXRfb3V0KSBBUyBuZXRfb3V0X21pbiwKICAgICAgIE1BWChuZXRfb3V0KSBBUyBuZXRfb3V0X21heCwKICAgICAgIEFWRyhuZXRfb3V0KSBBUyBuZXRfb3V0X2F2ZwpGUk9NICgKICBTRUxFQ1QgbWFjaGluZV9uYW1lLAogICAgICAgICBDT0FMRVNDRShjcHVfdXNlciwgMC4wKSBBUyBjcHUsCiAgICAgICAgIENPQUxFU0NFKGJ5dGVzX2luLCAwLjApIEFTIG5ldF9pbiwKICAgICAgICAgQ09BTEVTQ0UoYnl0ZXNfb3V0LCAwLjApIEFTIG5ldF9vdXQKICBGUk9NIG1nYmVuY2gubG9nczEKICBXSEVSRSBtYWNoaW5lX25hbWUgSU4gKCdhbmFuc2knLCdhcmFnb2cnLCd1cmQnKQogICAgQU5EIGxvZ190aW1lID49IFRJTUVTVEFNUCAnMjAxNy0wMS0xMSAwMDowMDowMCcKKSBBUyByCkdST1VQIEJZIG1hY2hpbmVfbmFtZQ==). +Данные также доступны для работы с интерактивными запросами через [Playground](https://gh-api.clickhouse.com/play?user=play), [пример](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIG1hY2hpbmVfbmFtZSwKICAgICAgIE1JTihjcHUpIEFTIGNwdV9taW4sCiAgICAgICBNQVgoY3B1KSBBUyBjcHVfbWF4LAogICAgICAgQVZHKGNwdSkgQVMgY3B1X2F2ZywKICAgICAgIE1JTihuZXRfaW4pIEFTIG5ldF9pbl9taW4sCiAgICAgICBNQVgobmV0X2luKSBBUyBuZXRfaW5fbWF4LAogICAgICAgQVZHKG5ldF9pbikgQVMgbmV0X2luX2F2ZywKICAgICAgIE1JTihuZXRfb3V0KSBBUyBuZXRfb3V0X21pbiwKICAgICAgIE1BWChuZXRfb3V0KSBBUyBuZXRfb3V0X21heCwKICAgICAgIEFWRyhuZXRfb3V0KSBBUyBuZXRfb3V0X2F2ZwpGUk9NICgKICBTRUxFQ1QgbWFjaGluZV9uYW1lLAogICAgICAgICBDT0FMRVNDRShjcHVfdXNlciwgMC4wKSBBUyBjcHUsCiAgICAgICAgIENPQUxFU0NFKGJ5dGVzX2luLCAwLjApIEFTIG5ldF9pbiwKICAgICAgICAgQ09BTEVTQ0UoYnl0ZXNfb3V0LCAwLjApIEFTIG5ldF9vdXQKICBGUk9NIG1nYmVuY2gubG9nczEKICBXSEVSRSBtYWNoaW5lX25hbWUgSU4gKCdhbmFuc2knLCdhcmFnb2cnLCd1cmQnKQogICAgQU5EIGxvZ190aW1lID49IFRJTUVTVEFNUCAnMjAxNy0wMS0xMSAwMDowMDowMCcKKSBBUyByCkdST1VQIEJZIG1hY2hpbmVfbmFtZQ==). diff --git a/docs/ru/getting-started/example-datasets/cell-towers.md b/docs/ru/getting-started/example-datasets/cell-towers.md index a5524248019..19a9851def4 100644 --- a/docs/ru/getting-started/example-datasets/cell-towers.md +++ b/docs/ru/getting-started/example-datasets/cell-towers.md @@ -11,7 +11,7 @@ OpenCelliD Project имеет лицензию Creative Commons Attribution-Shar ## Как получить набор данных {#get-the-dataset} -1. Загрузите снэпшот набора данных за февраль 2021 [отсюда](https://datasets.clickhouse.tech/cell_towers.csv.xz) (729 MB). +1. Загрузите снэпшот набора данных за февраль 2021 [отсюда](https://datasets.clickhouse.com/cell_towers.csv.xz) (729 MB). 2. Если нужно, проверьте полноту и целостность при помощи команды: @@ -125,4 +125,4 @@ SELECT count() FROM cell_towers WHERE pointInPolygon((lon, lat), (SELECT * FROM 1 rows in set. Elapsed: 0.067 sec. Processed 43.28 million rows, 692.42 MB (645.83 million rows/s., 10.33 GB/s.) ``` -Вы можете протестировать другие запросы с помощью интерактивного ресурса [Playground](https://gh-api.clickhouse.tech/play?user=play). Например, [вот так](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIG1jYywgY291bnQoKSBGUk9NIGNlbGxfdG93ZXJzIEdST1VQIEJZIG1jYyBPUkRFUiBCWSBjb3VudCgpIERFU0M=). Однако, обратите внимание, что здесь нельзя создавать временные таблицы. +Вы можете протестировать другие запросы с помощью интерактивного ресурса [Playground](https://gh-api.clickhouse.com/play?user=play). Например, [вот так](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUIG1jYywgY291bnQoKSBGUk9NIGNlbGxfdG93ZXJzIEdST1VQIEJZIG1jYyBPUkRFUiBCWSBjb3VudCgpIERFU0M=). Однако, обратите внимание, что здесь нельзя создавать временные таблицы. diff --git a/docs/ru/getting-started/example-datasets/github-events.md b/docs/ru/getting-started/example-datasets/github-events.md new file mode 120000 index 00000000000..c9649c0a61f --- /dev/null +++ b/docs/ru/getting-started/example-datasets/github-events.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/github-events.md \ No newline at end of file diff --git a/docs/ru/getting-started/example-datasets/index.md b/docs/ru/getting-started/example-datasets/index.md index 756b3a75dee..2049ddd5d86 100644 --- a/docs/ru/getting-started/example-datasets/index.md +++ b/docs/ru/getting-started/example-datasets/index.md @@ -9,12 +9,16 @@ toc_title: "Введение" Этот раздел описывает как получить тестовые массивы данных и загрузить их в ClickHouse. Для некоторых тестовых массивов данных также доступны тестовые запросы. -- [Анонимизированные данные Яндекс.Метрики](metrica.md) -- [Star Schema Benchmark](star-schema.md) -- [WikiStat](wikistat.md) -- [Терабайт логов кликов от Criteo](criteo.md) -- [AMPLab Big Data Benchmark](amplab-benchmark.md) -- [Данные о такси в Нью-Йорке](nyc-taxi.md) -- [OnTime](ontime.md) +- [Анонимизированные данные Яндекс.Метрики](../../getting-started/example-datasets/metrica.md) +- [Star Schema Benchmark](../../getting-started/example-datasets/star-schema.md) +- [Набор данных кулинарных рецептов](../../getting-started/example-datasets/recipes.md) +- [WikiStat](../../getting-started/example-datasets/wikistat.md) +- [Терабайт логов кликов от Criteo](../../getting-started/example-datasets/criteo.md) +- [AMPLab Big Data Benchmark](../../getting-started/example-datasets/amplab-benchmark.md) +- [Данные о такси в Нью-Йорке](../../getting-started/example-datasets/nyc-taxi.md) +- [Набор данных о воздушном движении OpenSky Network 2020](../../getting-started/example-datasets/opensky.md) +- [Данные о стоимости недвижимости в Великобритании](../../getting-started/example-datasets/uk-price-paid.md) +- [OnTime](../../getting-started/example-datasets/ontime.md) - [Вышки сотовой связи](../../getting-started/example-datasets/cell-towers.md) +[Оригинальная статья](https://clickhouse.tech/docs/ru/getting_started/example_datasets) diff --git a/docs/ru/getting-started/example-datasets/menus.md b/docs/ru/getting-started/example-datasets/menus.md new file mode 100644 index 00000000000..5b549975b8f --- /dev/null +++ b/docs/ru/getting-started/example-datasets/menus.md @@ -0,0 +1,360 @@ +--- +toc_priority: 21 +toc_title: Меню +--- + +# Набор данных публичной библиотеки Нью-Йорка "Что в меню?" {#menus-dataset} + +Набор данных создан Нью-Йоркской публичной библиотекой. Он содержит исторические данные о меню отелей, ресторанов и кафе с блюдами, а также их ценами. + +Источник: http://menus.nypl.org/data +Эти данные находятся в открытом доступе. + +Данные взяты из архива библиотеки, и они могут быть неполными и сложными для статистического анализа. Тем не менее, это тоже очень интересно. +В наборе всего 1,3 миллиона записей о блюдах в меню — очень небольшой объем данных для ClickHouse, но это все равно хороший пример. + +## Загрузите набор данных {#download-dataset} + +Выполните команду: + +```bash +wget https://s3.amazonaws.com/menusdata.nypl.org/gzips/2021_08_01_07_01_17_data.tgz +``` + +При необходимости замените ссылку на актуальную ссылку с http://menus.nypl.org/data. +Размер архива составляет около 35 МБ. + +## Распакуйте набор данных {#unpack-dataset} + +```bash +tar xvf 2021_08_01_07_01_17_data.tgz +``` + +Размер распакованных данных составляет около 150 МБ. + +Данные нормализованы и состоят из четырех таблиц: +- `Menu` — информация о меню: название ресторана, дата, когда было просмотрено меню, и т.д. +- `Dish` — информация о блюдах: название блюда вместе с некоторыми характеристиками. +- `MenuPage` — информация о страницах в меню, потому что каждая страница принадлежит какому-либо меню. +- `MenuItem` — один из пунктов меню. Блюдо вместе с его ценой на какой-либо странице меню: ссылки на блюдо и страницу меню. + +## Создайте таблицы {#create-tables} + +Для хранения цен используется тип данных [Decimal](../../sql-reference/data-types/decimal.md). + +```sql +CREATE TABLE dish +( + id UInt32, + name String, + description String, + menus_appeared UInt32, + times_appeared Int32, + first_appeared UInt16, + last_appeared UInt16, + lowest_price Decimal64(3), + highest_price Decimal64(3) +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu +( + id UInt32, + name String, + sponsor String, + event String, + venue String, + place String, + physical_description String, + occasion String, + notes String, + call_number String, + keywords String, + language String, + date String, + location String, + location_type String, + currency String, + currency_symbol String, + status String, + page_count UInt16, + dish_count UInt16 +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu_page +( + id UInt32, + menu_id UInt32, + page_number UInt16, + image_id String, + full_height UInt16, + full_width UInt16, + uuid UUID +) ENGINE = MergeTree ORDER BY id; + +CREATE TABLE menu_item +( + id UInt32, + menu_page_id UInt32, + price Decimal64(3), + high_price Decimal64(3), + dish_id UInt32, + created_at DateTime, + updated_at DateTime, + xpos Float64, + ypos Float64 +) ENGINE = MergeTree ORDER BY id; +``` + +## Импортируйте данные {#import-data} + +Импортируйте данные в ClickHouse, выполните команды: + +```bash +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO dish FORMAT CSVWithNames" < Dish.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu FORMAT CSVWithNames" < Menu.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --query "INSERT INTO menu_page FORMAT CSVWithNames" < MenuPage.csv +clickhouse-client --format_csv_allow_single_quotes 0 --input_format_null_as_default 0 --date_time_input_format best_effort --query "INSERT INTO menu_item FORMAT CSVWithNames" < MenuItem.csv +``` + +Поскольку данные представлены в формате CSV с заголовком, используется формат [CSVWithNames](../../interfaces/formats.md#csvwithnames). + +Отключите `format_csv_allow_single_quotes`, так как для данных используются только двойные кавычки, а одинарные кавычки могут находиться внутри значений и не должны сбивать с толку CSV-парсер. + +Отключите [input_format_null_as_default](../../operations/settings/settings.md#settings-input-format-null-as-default), поскольку в данных нет значений [NULL](../../sql-reference/syntax.md#null-literal). + +В противном случае ClickHouse попытается проанализировать последовательности `\N` и может перепутать с `\` в данных. + +Настройка [date_time_input_format best_effort](../../operations/settings/settings.md#settings-date_time_input_format) позволяет анализировать поля [DateTime](../../sql-reference/data-types/datetime.md) в самых разных форматах. К примеру, будет распознан ISO-8601 без секунд: '2000-01-01 01:02'. Без этой настройки допускается только фиксированный формат даты и времени. + +## Денормализуйте данные {#denormalize-data} + +Данные представлены в нескольких таблицах в [нормализованном виде](https://ru.wikipedia.org/wiki/%D0%9D%D0%BE%D1%80%D0%BC%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%84%D0%BE%D1%80%D0%BC%D0%B0). + +Это означает, что вам нужно использовать условие объединения [JOIN](../../sql-reference/statements/select/join.md#select-join), если вы хотите получить, например, названия блюд из пунктов меню. + +Для типовых аналитических задач гораздо эффективнее работать с предварительно объединенными данными, чтобы не использовать `JOIN` каждый раз. Такие данные называются денормализованными. + +Создайте таблицу `menu_item_denorm`, которая будет содержать все данные, объединенные вместе: + +```sql +CREATE TABLE menu_item_denorm +ENGINE = MergeTree ORDER BY (dish_name, created_at) +AS SELECT + price, + high_price, + created_at, + updated_at, + xpos, + ypos, + dish.id AS dish_id, + dish.name AS dish_name, + dish.description AS dish_description, + dish.menus_appeared AS dish_menus_appeared, + dish.times_appeared AS dish_times_appeared, + dish.first_appeared AS dish_first_appeared, + dish.last_appeared AS dish_last_appeared, + dish.lowest_price AS dish_lowest_price, + dish.highest_price AS dish_highest_price, + menu.id AS menu_id, + menu.name AS menu_name, + menu.sponsor AS menu_sponsor, + menu.event AS menu_event, + menu.venue AS menu_venue, + menu.place AS menu_place, + menu.physical_description AS menu_physical_description, + menu.occasion AS menu_occasion, + menu.notes AS menu_notes, + menu.call_number AS menu_call_number, + menu.keywords AS menu_keywords, + menu.language AS menu_language, + menu.date AS menu_date, + menu.location AS menu_location, + menu.location_type AS menu_location_type, + menu.currency AS menu_currency, + menu.currency_symbol AS menu_currency_symbol, + menu.status AS menu_status, + menu.page_count AS menu_page_count, + menu.dish_count AS menu_dish_count +FROM menu_item + JOIN dish ON menu_item.dish_id = dish.id + JOIN menu_page ON menu_item.menu_page_id = menu_page.id + JOIN menu ON menu_page.menu_id = menu.id; +``` + +## Проверьте загруженные данные {#validate-data} + +Запрос: + +```sql +SELECT count() FROM menu_item_denorm; +``` + +Результат: + +```text +┌─count()─┐ +│ 1329175 │ +└─────────┘ +``` + +## Примеры запросов {#run-queries} + +### Усредненные исторические цены на блюда {#query-averaged-historical-prices} + +Запрос: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 100, 100) +FROM menu_item_denorm +WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) +GROUP BY d +ORDER BY d ASC; +``` + +Результат: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 100, 100)─┐ +│ 1850 │ 618 │ 1.5 │ █▍ │ +│ 1860 │ 1634 │ 1.29 │ █▎ │ +│ 1870 │ 2215 │ 1.36 │ █▎ │ +│ 1880 │ 3909 │ 1.01 │ █ │ +│ 1890 │ 8837 │ 1.4 │ █▍ │ +│ 1900 │ 176292 │ 0.68 │ ▋ │ +│ 1910 │ 212196 │ 0.88 │ ▊ │ +│ 1920 │ 179590 │ 0.74 │ ▋ │ +│ 1930 │ 73707 │ 0.6 │ ▌ │ +│ 1940 │ 58795 │ 0.57 │ ▌ │ +│ 1950 │ 41407 │ 0.95 │ ▊ │ +│ 1960 │ 51179 │ 1.32 │ █▎ │ +│ 1970 │ 12914 │ 1.86 │ █▋ │ +│ 1980 │ 7268 │ 4.35 │ ████▎ │ +│ 1990 │ 11055 │ 6.03 │ ██████ │ +│ 2000 │ 2467 │ 11.85 │ ███████████▋ │ +│ 2010 │ 597 │ 25.66 │ █████████████████████████▋ │ +└──────┴─────────┴──────────────────────┴──────────────────────────────┘ +``` + +Просто не принимайте это всерьез. + +### Цены на бургеры {#query-burger-prices} + +Запрос: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100) +FROM menu_item_denorm +WHERE (menu_currency = 'Dollars') AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%burger%') +GROUP BY d +ORDER BY d ASC; +``` + +Результат: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)───────────┐ +│ 1880 │ 2 │ 0.42 │ ▋ │ +│ 1890 │ 7 │ 0.85 │ █▋ │ +│ 1900 │ 399 │ 0.49 │ ▊ │ +│ 1910 │ 589 │ 0.68 │ █▎ │ +│ 1920 │ 280 │ 0.56 │ █ │ +│ 1930 │ 74 │ 0.42 │ ▋ │ +│ 1940 │ 119 │ 0.59 │ █▏ │ +│ 1950 │ 134 │ 1.09 │ ██▏ │ +│ 1960 │ 272 │ 0.92 │ █▋ │ +│ 1970 │ 108 │ 1.18 │ ██▎ │ +│ 1980 │ 88 │ 2.82 │ █████▋ │ +│ 1990 │ 184 │ 3.68 │ ███████▎ │ +│ 2000 │ 21 │ 7.14 │ ██████████████▎ │ +│ 2010 │ 6 │ 18.42 │ ████████████████████████████████████▋ │ +└──────┴─────────┴──────────────────────┴───────────────────────────────────────┘ +``` + +### Водка {#query-vodka} + +Запрос: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100) +FROM menu_item_denorm +WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%vodka%') +GROUP BY d +ORDER BY d ASC; +``` + +Результат: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)─┐ +│ 1910 │ 2 │ 0 │ │ +│ 1920 │ 1 │ 0.3 │ ▌ │ +│ 1940 │ 21 │ 0.42 │ ▋ │ +│ 1950 │ 14 │ 0.59 │ █▏ │ +│ 1960 │ 113 │ 2.17 │ ████▎ │ +│ 1970 │ 37 │ 0.68 │ █▎ │ +│ 1980 │ 19 │ 2.55 │ █████ │ +│ 1990 │ 86 │ 3.6 │ ███████▏ │ +│ 2000 │ 2 │ 3.98 │ ███████▊ │ +└──────┴─────────┴──────────────────────┴─────────────────────────────┘ +``` + +Чтобы получить водку, мы должны написать `ILIKE '%vodka%'`, и это хорошая идея. + +### Икра {#query-caviar} + +Посмотрите цены на икру. Получите название любого блюда с икрой. + +Запрос: + +```sql +SELECT + round(toUInt32OrZero(extract(menu_date, '^\\d{4}')), -1) AS d, + count(), + round(avg(price), 2), + bar(avg(price), 0, 50, 100), + any(dish_name) +FROM menu_item_denorm +WHERE (menu_currency IN ('Dollars', '')) AND (d > 0) AND (d < 2022) AND (dish_name ILIKE '%caviar%') +GROUP BY d +ORDER BY d ASC; +``` + +Результат: + +```text +┌────d─┬─count()─┬─round(avg(price), 2)─┬─bar(avg(price), 0, 50, 100)──────┬─any(dish_name)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +│ 1090 │ 1 │ 0 │ │ Caviar │ +│ 1880 │ 3 │ 0 │ │ Caviar │ +│ 1890 │ 39 │ 0.59 │ █▏ │ Butter and caviar │ +│ 1900 │ 1014 │ 0.34 │ ▋ │ Anchovy Caviar on Toast │ +│ 1910 │ 1588 │ 1.35 │ ██▋ │ 1/1 Brötchen Caviar │ +│ 1920 │ 927 │ 1.37 │ ██▋ │ ASTRAKAN CAVIAR │ +│ 1930 │ 289 │ 1.91 │ ███▋ │ Astrachan caviar │ +│ 1940 │ 201 │ 0.83 │ █▋ │ (SPECIAL) Domestic Caviar Sandwich │ +│ 1950 │ 81 │ 2.27 │ ████▌ │ Beluga Caviar │ +│ 1960 │ 126 │ 2.21 │ ████▍ │ Beluga Caviar │ +│ 1970 │ 105 │ 0.95 │ █▊ │ BELUGA MALOSSOL CAVIAR AMERICAN DRESSING │ +│ 1980 │ 12 │ 7.22 │ ██████████████▍ │ Authentic Iranian Beluga Caviar the world's finest black caviar presented in ice garni and a sampling of chilled 100° Russian vodka │ +│ 1990 │ 74 │ 14.42 │ ████████████████████████████▋ │ Avocado Salad, Fresh cut avocado with caviare │ +│ 2000 │ 3 │ 7.82 │ ███████████████▋ │ Aufgeschlagenes Kartoffelsueppchen mit Forellencaviar │ +│ 2010 │ 6 │ 15.58 │ ███████████████████████████████▏ │ "OYSTERS AND PEARLS" "Sabayon" of Pearl Tapioca with Island Creek Oysters and Russian Sevruga Caviar │ +└──────┴─────────┴──────────────────────┴──────────────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +По крайней мере, есть икра с водкой. Очень мило. + +## Online Playground {#playground} + +Этот набор данных доступен в интерактивном ресурсе [Online Playground](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICByb3VuZCh0b1VJbnQzMk9yWmVybyhleHRyYWN0KG1lbnVfZGF0ZSwgJ15cXGR7NH0nKSksIC0xKSBBUyBkLAogICAgY291bnQoKSwKICAgIHJvdW5kKGF2ZyhwcmljZSksIDIpLAogICAgYmFyKGF2ZyhwcmljZSksIDAsIDUwLCAxMDApLAogICAgYW55KGRpc2hfbmFtZSkKRlJPTSBtZW51X2l0ZW1fZGVub3JtCldIRVJFIChtZW51X2N1cnJlbmN5IElOICgnRG9sbGFycycsICcnKSkgQU5EIChkID4gMCkgQU5EIChkIDwgMjAyMikgQU5EIChkaXNoX25hbWUgSUxJS0UgJyVjYXZpYXIlJykKR1JPVVAgQlkgZApPUkRFUiBCWSBkIEFTQw==). diff --git a/docs/ru/getting-started/example-datasets/metrica.md b/docs/ru/getting-started/example-datasets/metrica.md index 7deacdb836c..c82048a445e 100644 --- a/docs/ru/getting-started/example-datasets/metrica.md +++ b/docs/ru/getting-started/example-datasets/metrica.md @@ -5,14 +5,14 @@ toc_title: "Анонимизированные данные Яндекс.Мет # Анонимизированные данные Яндекс.Метрики {#anonimizirovannye-dannye-iandeks-metriki} -Датасет состоит из двух таблиц, содержащих анонимизированные данные о хитах (`hits_v1`) и визитах (`visits_v1`) Яндекс.Метрики. Каждую из таблиц можно скачать в виде сжатого `.tsv.xz`-файла или в виде уже готовых партиций. Также можно скачать расширенную версию таблицы `hits`, содержащую 100 миллионов строк в виде [архива c файлами TSV](https://datasets.clickhouse.tech/hits/tsv/hits_100m_obfuscated_v1.tsv.xz) и в виде [готовых партиций](https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz). +Датасет состоит из двух таблиц, содержащих анонимизированные данные о хитах (`hits_v1`) и визитах (`visits_v1`) Яндекс.Метрики. Каждую из таблиц можно скачать в виде сжатого `.tsv.xz`-файла или в виде уже готовых партиций. Также можно скачать расширенную версию таблицы `hits`, содержащую 100 миллионов строк в виде [архива c файлами TSV](https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz) и в виде [готовых партиций](https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz). ## Получение таблиц из партиций {#poluchenie-tablits-iz-partitsii} **Скачивание и импортирование партиций hits:** ``` bash -$ curl -O https://datasets.clickhouse.tech/hits/partitions/hits_v1.tar +$ curl -O https://datasets.clickhouse.com/hits/partitions/hits_v1.tar $ tar xvf hits_v1.tar -C /var/lib/clickhouse # путь к папке с данными ClickHouse $ # убедитесь, что установлены корректные права доступа на файлы $ sudo service clickhouse-server restart @@ -22,7 +22,7 @@ $ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" **Скачивание и импортирование партиций visits:** ``` bash -$ curl -O https://datasets.clickhouse.tech/visits/partitions/visits_v1.tar +$ curl -O https://datasets.clickhouse.com/visits/partitions/visits_v1.tar $ tar xvf visits_v1.tar -C /var/lib/clickhouse # путь к папке с данными ClickHouse $ # убедитесь, что установлены корректные права доступа на файлы $ sudo service clickhouse-server restart @@ -34,7 +34,7 @@ $ clickhouse-client --query "SELECT COUNT(*) FROM datasets.visits_v1" **Скачивание и импортирование hits из сжатого tsv-файла** ``` bash -$ curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +$ curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv $ # теперь создадим таблицу $ clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" $ clickhouse-client --query "CREATE TABLE datasets.hits_v1 ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" @@ -48,7 +48,7 @@ $ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" **Скачивание и импортирование visits из сжатого tsv-файла** ``` bash -$ curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +$ curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv $ # теперь создадим таблицу $ clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" $ clickhouse-client --query "CREATE TABLE datasets.visits_v1 ( CounterID UInt32, StartDate Date, Sign Int8, IsNew UInt8, VisitID UInt64, UserID UInt64, StartTime DateTime, Duration UInt32, UTCStartTime DateTime, PageViews Int32, Hits Int32, IsBounce UInt8, Referer String, StartURL String, RefererDomain String, StartURLDomain String, EndURL String, LinkURL String, IsDownload UInt8, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, PlaceID Int32, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), IsYandex UInt8, GoalReachesDepth Int32, GoalReachesURL Int32, GoalReachesAny Int32, SocialSourceNetworkID UInt8, SocialSourcePage String, MobilePhoneModel String, ClientEventTime DateTime, RegionID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RemoteIP UInt32, RemoteIP6 FixedString(16), IPNetworkID UInt32, SilverlightVersion3 UInt32, CodeVersion UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, UserAgentMajor UInt16, UserAgentMinor UInt16, WindowClientWidth UInt16, WindowClientHeight UInt16, SilverlightVersion2 UInt8, SilverlightVersion4 UInt16, FlashVersion3 UInt16, FlashVersion4 UInt16, ClientTimeZone Int16, OS UInt8, UserAgent UInt8, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, NetMajor UInt8, NetMinor UInt8, MobilePhone UInt8, SilverlightVersion1 UInt8, Age UInt8, Sex UInt8, Income UInt8, JavaEnable UInt8, CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, BrowserLanguage UInt16, BrowserCountry UInt16, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), Params Array(String), Goals Nested(ID UInt32, Serial UInt32, EventTime DateTime, Price Int64, OrderID String, CurrencyID UInt32), WatchIDs Array(UInt64), ParamSumPrice Int64, ParamCurrency FixedString(3), ParamCurrencyID UInt16, ClickLogID UInt64, ClickEventID Int32, ClickGoodEvent Int32, ClickEventTime DateTime, ClickPriorityID Int32, ClickPhraseID Int32, ClickPageID Int32, ClickPlaceID Int32, ClickTypeID Int32, ClickResourceID Int32, ClickCost UInt32, ClickClientIP UInt32, ClickDomainID UInt32, ClickURL String, ClickAttempt UInt8, ClickOrderID UInt32, ClickBannerID UInt32, ClickMarketCategoryID UInt32, ClickMarketPP UInt32, ClickMarketCategoryName String, ClickMarketPPName String, ClickAWAPSCampaignName String, ClickPageName String, ClickTargetType UInt16, ClickTargetPhraseID UInt64, ClickContextType UInt8, ClickSelectType Int8, ClickOptions String, ClickGroupBannerID Int32, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, FirstVisit DateTime, PredLastVisit Date, LastVisit Date, TotalVisits UInt32, TraficSource Nested(ID Int8, SearchEngineID UInt16, AdvEngineID UInt8, PlaceID UInt16, SocialSourceNetworkID UInt8, Domain String, SearchPhrase String, SocialSourcePage String), Attendance FixedString(16), CLID UInt32, YCLID UInt64, NormalizedRefererHash UInt64, SearchPhraseHash UInt64, RefererDomainHash UInt64, NormalizedStartURLHash UInt64, StartURLDomainHash UInt64, NormalizedEndURLHash UInt64, TopLevelDomain UInt64, URLScheme UInt64, OpenstatServiceNameHash UInt64, OpenstatCampaignIDHash UInt64, OpenstatAdIDHash UInt64, OpenstatSourceIDHash UInt64, UTMSourceHash UInt64, UTMMediumHash UInt64, UTMCampaignHash UInt64, UTMContentHash UInt64, UTMTermHash UInt64, FromHash UInt64, WebVisorEnabled UInt8, WebVisorActivity UInt32, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), Market Nested(Type UInt8, GoalID UInt32, OrderID String, OrderPrice Int64, PP UInt32, DirectPlaceID UInt32, DirectOrderID UInt32, DirectBannerID UInt32, GoodID String, GoodName String, GoodQuantity Int32, GoodPrice Int64), IslandID FixedString(16)) ENGINE = CollapsingMergeTree(Sign) PARTITION BY toYYYYMM(StartDate) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" diff --git a/docs/ru/getting-started/example-datasets/nyc-taxi.md b/docs/ru/getting-started/example-datasets/nyc-taxi.md index 38a60ed1b2d..9c3ef6b0652 100644 --- a/docs/ru/getting-started/example-datasets/nyc-taxi.md +++ b/docs/ru/getting-started/example-datasets/nyc-taxi.md @@ -283,7 +283,7 @@ SELECT formatReadableSize(sum(bytes)) FROM system.parts WHERE table = 'trips_mer ## Скачивание готовых партиций {#skachivanie-gotovykh-partitsii} ``` bash -$ curl -O https://datasets.clickhouse.tech/trips_mergetree/partitions/trips_mergetree.tar +$ curl -O https://datasets.clickhouse.com/trips_mergetree/partitions/trips_mergetree.tar $ tar xvf trips_mergetree.tar -C /var/lib/clickhouse # путь к папке с данными ClickHouse $ # убедитесь, что установлены корректные права доступа на файлы $ sudo service clickhouse-server restart diff --git a/docs/ru/getting-started/example-datasets/ontime.md b/docs/ru/getting-started/example-datasets/ontime.md index d46b7e75e7f..e1d47a5a9e7 100644 --- a/docs/ru/getting-started/example-datasets/ontime.md +++ b/docs/ru/getting-started/example-datasets/ontime.md @@ -153,7 +153,7 @@ ls -1 *.zip | xargs -I{} -P $(nproc) bash -c "echo {}; unzip -cq {} '*.csv' | se ## Скачивание готовых партиций {#skachivanie-gotovykh-partitsii} ``` bash -$ curl -O https://datasets.clickhouse.tech/ontime/partitions/ontime.tar +$ curl -O https://datasets.clickhouse.com/ontime/partitions/ontime.tar $ tar xvf ontime.tar -C /var/lib/clickhouse # путь к папке с данными ClickHouse $ # убедитесь, что установлены корректные права доступа на файлы $ sudo service clickhouse-server restart diff --git a/docs/ru/getting-started/example-datasets/opensky.md b/docs/ru/getting-started/example-datasets/opensky.md new file mode 100644 index 00000000000..bda5dec3c47 --- /dev/null +++ b/docs/ru/getting-started/example-datasets/opensky.md @@ -0,0 +1,422 @@ +--- +toc_priority: 20 +toc_title: Набор данных о воздушном движении OpenSky Network 2020 +--- + +# Набор данных о воздушном движении OpenSky Network 2020 {#opensky} + +"Данные в этом наборе получены и отфильтрованы из полного набора данных OpenSky, чтобы проиллюстрировать развитие воздушного движения во время пандемии COVID-19. Набор включает в себя все рейсы, которые видели более 2500 участников сети с 1 января 2019 года. Дополнительные данные будут периодически включаться в набор данных до окончания пандемии COVID-19". + +Источник: https://zenodo.org/record/5092942#.YRBCyTpRXYd + +Martin Strohmeier, Xavier Olive, Jannis Lübbe, Matthias Schäfer, and Vincent Lenders +"Crowdsourced air traffic data from the OpenSky Network 2019–2020" +Earth System Science Data 13(2), 2021 +https://doi.org/10.5194/essd-13-357-2021 + +## Загрузите набор данных {#download-dataset} + +Выполните команду: + +```bash +wget -O- https://zenodo.org/record/5092942 | grep -oP 'https://zenodo.org/record/5092942/files/flightlist_\d+_\d+\.csv\.gz' | xargs wget +``` + +Загрузка займет около 2 минут при хорошем подключении к интернету. Будет загружено 30 файлов общим размером 4,3 ГБ. + +## Создайте таблицу {#create-table} + +```sql +CREATE TABLE opensky +( + callsign String, + number String, + icao24 String, + registration String, + typecode String, + origin String, + destination String, + firstseen DateTime, + lastseen DateTime, + day DateTime, + latitude_1 Float64, + longitude_1 Float64, + altitude_1 Float64, + latitude_2 Float64, + longitude_2 Float64, + altitude_2 Float64 +) ENGINE = MergeTree ORDER BY (origin, destination, callsign); +``` + +## Импортируйте данные в ClickHouse {#import-data} + +Загрузите данные в ClickHouse параллельными потоками: + +```bash +ls -1 flightlist_*.csv.gz | xargs -P100 -I{} bash -c 'gzip -c -d "{}" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"' +``` + +- Список файлов передаётся (`ls -1 flightlist_*.csv.gz`) в `xargs` для параллельной обработки. +- `xargs -P100` указывает на возможность использования до 100 параллельных обработчиков, но поскольку у нас всего 30 файлов, то количество обработчиков будет всего 30. +- Для каждого файла `xargs` будет запускать скрипт с `bash -c`. Сценарий имеет подстановку в виде `{}`, а команда `xargs` заменяет имя файла на указанные в подстановке символы (мы указали это для `xargs` с помощью `-I{}`). +- Скрипт распакует файл (`gzip -c -d "{}"`) в стандартный вывод (параметр `-c`) и перенаправит его в `clickhouse-client`. +- Чтобы распознать формат ISO-8601 со смещениями часовых поясов в полях типа [DateTime](../../sql-reference/data-types/datetime.md), указывается параметр парсера [--date_time_input_format best_effort](../../operations/settings/settings.md#settings-date_time_input_format). + +В итоге: клиент clickhouse добавит данные в таблицу `opensky`. Входные данные импортируются в формате [CSVWithNames](../../interfaces/formats.md#csvwithnames). + + +Загрузка параллельными потоками займёт около 24 секунд. + +Также вы можете использовать вариант последовательной загрузки: + +```bash +for file in flightlist_*.csv.gz; do gzip -c -d "$file" | clickhouse-client --date_time_input_format best_effort --query "INSERT INTO opensky FORMAT CSVWithNames"; done +``` + +## Проверьте импортированные данные {#validate-data} + +Запрос: + +```sql +SELECT count() FROM opensky; +``` + +Результат: + +```text +┌──count()─┐ +│ 66010819 │ +└──────────┘ +``` + +Убедитесь, что размер набора данных в ClickHouse составляет всего 2,66 GiB. + +Запрос: + +```sql +SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'opensky'; +``` + +Результат: + +```text +┌─formatReadableSize(total_bytes)─┐ +│ 2.66 GiB │ +└─────────────────────────────────┘ +``` + +## Примеры {#run-queries} + +Общее пройденное расстояние составляет 68 миллиардов километров. + +Запрос: + +```sql +SELECT formatReadableQuantity(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) / 1000) FROM opensky; +``` + +Результат: + +```text +┌─formatReadableQuantity(divide(sum(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)), 1000))─┐ +│ 68.72 billion │ +└──────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +``` + +Средняя дальность полета составляет около 1000 км. + +Запрос: + +```sql +SELECT avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2)) FROM opensky; +``` + +Результат: + +```text +┌─avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2))─┐ +│ 1041090.6465708319 │ +└────────────────────────────────────────────────────────────────────┘ +``` + +### Наиболее загруженные аэропорты в указанных координатах и среднее пройденное расстояние {#busy-airports-average-distance} + +Запрос: + +```sql +SELECT + origin, + count(), + round(avg(geoDistance(longitude_1, latitude_1, longitude_2, latitude_2))) AS distance, + bar(distance, 0, 10000000, 100) AS bar +FROM opensky +WHERE origin != '' +GROUP BY origin +ORDER BY count() DESC +LIMIT 100; +``` + +Результат: + +```text + ┌─origin─┬─count()─┬─distance─┬─bar────────────────────────────────────┐ + 1. │ KORD │ 745007 │ 1546108 │ ███████████████▍ │ + 2. │ KDFW │ 696702 │ 1358721 │ █████████████▌ │ + 3. │ KATL │ 667286 │ 1169661 │ ███████████▋ │ + 4. │ KDEN │ 582709 │ 1287742 │ ████████████▊ │ + 5. │ KLAX │ 581952 │ 2628393 │ ██████████████████████████▎ │ + 6. │ KLAS │ 447789 │ 1336967 │ █████████████▎ │ + 7. │ KPHX │ 428558 │ 1345635 │ █████████████▍ │ + 8. │ KSEA │ 412592 │ 1757317 │ █████████████████▌ │ + 9. │ KCLT │ 404612 │ 880355 │ ████████▋ │ + 10. │ VIDP │ 363074 │ 1445052 │ ██████████████▍ │ + 11. │ EDDF │ 362643 │ 2263960 │ ██████████████████████▋ │ + 12. │ KSFO │ 361869 │ 2445732 │ ████████████████████████▍ │ + 13. │ KJFK │ 349232 │ 2996550 │ █████████████████████████████▊ │ + 14. │ KMSP │ 346010 │ 1287328 │ ████████████▋ │ + 15. │ LFPG │ 344748 │ 2206203 │ ██████████████████████ │ + 16. │ EGLL │ 341370 │ 3216593 │ ████████████████████████████████▏ │ + 17. │ EHAM │ 340272 │ 2116425 │ █████████████████████▏ │ + 18. │ KEWR │ 337696 │ 1826545 │ ██████████████████▎ │ + 19. │ KPHL │ 320762 │ 1291761 │ ████████████▊ │ + 20. │ OMDB │ 308855 │ 2855706 │ ████████████████████████████▌ │ + 21. │ UUEE │ 307098 │ 1555122 │ ███████████████▌ │ + 22. │ KBOS │ 304416 │ 1621675 │ ████████████████▏ │ + 23. │ LEMD │ 291787 │ 1695097 │ ████████████████▊ │ + 24. │ YSSY │ 272979 │ 1875298 │ ██████████████████▋ │ + 25. │ KMIA │ 265121 │ 1923542 │ ███████████████████▏ │ + 26. │ ZGSZ │ 263497 │ 745086 │ ███████▍ │ + 27. │ EDDM │ 256691 │ 1361453 │ █████████████▌ │ + 28. │ WMKK │ 254264 │ 1626688 │ ████████████████▎ │ + 29. │ CYYZ │ 251192 │ 2175026 │ █████████████████████▋ │ + 30. │ KLGA │ 248699 │ 1106935 │ ███████████ │ + 31. │ VHHH │ 248473 │ 3457658 │ ██████████████████████████████████▌ │ + 32. │ RJTT │ 243477 │ 1272744 │ ████████████▋ │ + 33. │ KBWI │ 241440 │ 1187060 │ ███████████▋ │ + 34. │ KIAD │ 239558 │ 1683485 │ ████████████████▋ │ + 35. │ KIAH │ 234202 │ 1538335 │ ███████████████▍ │ + 36. │ KFLL │ 223447 │ 1464410 │ ██████████████▋ │ + 37. │ KDAL │ 212055 │ 1082339 │ ██████████▋ │ + 38. │ KDCA │ 207883 │ 1013359 │ ██████████▏ │ + 39. │ LIRF │ 207047 │ 1427965 │ ██████████████▎ │ + 40. │ PANC │ 206007 │ 2525359 │ █████████████████████████▎ │ + 41. │ LTFJ │ 205415 │ 860470 │ ████████▌ │ + 42. │ KDTW │ 204020 │ 1106716 │ ███████████ │ + 43. │ VABB │ 201679 │ 1300865 │ █████████████ │ + 44. │ OTHH │ 200797 │ 3759544 │ █████████████████████████████████████▌ │ + 45. │ KMDW │ 200796 │ 1232551 │ ████████████▎ │ + 46. │ KSAN │ 198003 │ 1495195 │ ██████████████▊ │ + 47. │ KPDX │ 197760 │ 1269230 │ ████████████▋ │ + 48. │ SBGR │ 197624 │ 2041697 │ ████████████████████▍ │ + 49. │ VOBL │ 189011 │ 1040180 │ ██████████▍ │ + 50. │ LEBL │ 188956 │ 1283190 │ ████████████▋ │ + 51. │ YBBN │ 188011 │ 1253405 │ ████████████▌ │ + 52. │ LSZH │ 187934 │ 1572029 │ ███████████████▋ │ + 53. │ YMML │ 187643 │ 1870076 │ ██████████████████▋ │ + 54. │ RCTP │ 184466 │ 2773976 │ ███████████████████████████▋ │ + 55. │ KSNA │ 180045 │ 778484 │ ███████▋ │ + 56. │ EGKK │ 176420 │ 1694770 │ ████████████████▊ │ + 57. │ LOWW │ 176191 │ 1274833 │ ████████████▋ │ + 58. │ UUDD │ 176099 │ 1368226 │ █████████████▋ │ + 59. │ RKSI │ 173466 │ 3079026 │ ██████████████████████████████▋ │ + 60. │ EKCH │ 172128 │ 1229895 │ ████████████▎ │ + 61. │ KOAK │ 171119 │ 1114447 │ ███████████▏ │ + 62. │ RPLL │ 170122 │ 1440735 │ ██████████████▍ │ + 63. │ KRDU │ 167001 │ 830521 │ ████████▎ │ + 64. │ KAUS │ 164524 │ 1256198 │ ████████████▌ │ + 65. │ KBNA │ 163242 │ 1022726 │ ██████████▏ │ + 66. │ KSDF │ 162655 │ 1380867 │ █████████████▋ │ + 67. │ ENGM │ 160732 │ 910108 │ █████████ │ + 68. │ LIMC │ 160696 │ 1564620 │ ███████████████▋ │ + 69. │ KSJC │ 159278 │ 1081125 │ ██████████▋ │ + 70. │ KSTL │ 157984 │ 1026699 │ ██████████▎ │ + 71. │ UUWW │ 156811 │ 1261155 │ ████████████▌ │ + 72. │ KIND │ 153929 │ 987944 │ █████████▊ │ + 73. │ ESSA │ 153390 │ 1203439 │ ████████████ │ + 74. │ KMCO │ 153351 │ 1508657 │ ███████████████ │ + 75. │ KDVT │ 152895 │ 74048 │ ▋ │ + 76. │ VTBS │ 152645 │ 2255591 │ ██████████████████████▌ │ + 77. │ CYVR │ 149574 │ 2027413 │ ████████████████████▎ │ + 78. │ EIDW │ 148723 │ 1503985 │ ███████████████ │ + 79. │ LFPO │ 143277 │ 1152964 │ ███████████▌ │ + 80. │ EGSS │ 140830 │ 1348183 │ █████████████▍ │ + 81. │ KAPA │ 140776 │ 420441 │ ████▏ │ + 82. │ KHOU │ 138985 │ 1068806 │ ██████████▋ │ + 83. │ KTPA │ 138033 │ 1338223 │ █████████████▍ │ + 84. │ KFFZ │ 137333 │ 55397 │ ▌ │ + 85. │ NZAA │ 136092 │ 1581264 │ ███████████████▋ │ + 86. │ YPPH │ 133916 │ 1271550 │ ████████████▋ │ + 87. │ RJBB │ 133522 │ 1805623 │ ██████████████████ │ + 88. │ EDDL │ 133018 │ 1265919 │ ████████████▋ │ + 89. │ ULLI │ 130501 │ 1197108 │ ███████████▊ │ + 90. │ KIWA │ 127195 │ 250876 │ ██▌ │ + 91. │ KTEB │ 126969 │ 1189414 │ ███████████▊ │ + 92. │ VOMM │ 125616 │ 1127757 │ ███████████▎ │ + 93. │ LSGG │ 123998 │ 1049101 │ ██████████▍ │ + 94. │ LPPT │ 122733 │ 1779187 │ █████████████████▋ │ + 95. │ WSSS │ 120493 │ 3264122 │ ████████████████████████████████▋ │ + 96. │ EBBR │ 118539 │ 1579939 │ ███████████████▋ │ + 97. │ VTBD │ 118107 │ 661627 │ ██████▌ │ + 98. │ KVNY │ 116326 │ 692960 │ ██████▊ │ + 99. │ EDDT │ 115122 │ 941740 │ █████████▍ │ +100. │ EFHK │ 114860 │ 1629143 │ ████████████████▎ │ + └────────┴─────────┴──────────┴────────────────────────────────────────┘ +``` + +### Номера рейсов из трех крупных аэропортов Москвы, еженедельно {#flights-from-moscow} + +Запрос: + +```sql +SELECT + toMonday(day) AS k, + count() AS c, + bar(c, 0, 10000, 100) AS bar +FROM opensky +WHERE origin IN ('UUEE', 'UUDD', 'UUWW') +GROUP BY k +ORDER BY k ASC; +``` + +Результат: + +```text + ┌──────────k─┬────c─┬─bar──────────────────────────────────────────────────────────────────────────┐ + 1. │ 2018-12-31 │ 5248 │ ████████████████████████████████████████████████████▍ │ + 2. │ 2019-01-07 │ 6302 │ ███████████████████████████████████████████████████████████████ │ + 3. │ 2019-01-14 │ 5701 │ █████████████████████████████████████████████████████████ │ + 4. │ 2019-01-21 │ 5638 │ ████████████████████████████████████████████████████████▍ │ + 5. │ 2019-01-28 │ 5731 │ █████████████████████████████████████████████████████████▎ │ + 6. │ 2019-02-04 │ 5683 │ ████████████████████████████████████████████████████████▋ │ + 7. │ 2019-02-11 │ 5759 │ █████████████████████████████████████████████████████████▌ │ + 8. │ 2019-02-18 │ 5736 │ █████████████████████████████████████████████████████████▎ │ + 9. │ 2019-02-25 │ 5873 │ ██████████████████████████████████████████████████████████▋ │ + 10. │ 2019-03-04 │ 5965 │ ███████████████████████████████████████████████████████████▋ │ + 11. │ 2019-03-11 │ 5900 │ ███████████████████████████████████████████████████████████ │ + 12. │ 2019-03-18 │ 5823 │ ██████████████████████████████████████████████████████████▏ │ + 13. │ 2019-03-25 │ 5899 │ ██████████████████████████████████████████████████████████▊ │ + 14. │ 2019-04-01 │ 6043 │ ████████████████████████████████████████████████████████████▍ │ + 15. │ 2019-04-08 │ 6098 │ ████████████████████████████████████████████████████████████▊ │ + 16. │ 2019-04-15 │ 6196 │ █████████████████████████████████████████████████████████████▊ │ + 17. │ 2019-04-22 │ 6486 │ ████████████████████████████████████████████████████████████████▋ │ + 18. │ 2019-04-29 │ 6682 │ ██████████████████████████████████████████████████████████████████▋ │ + 19. │ 2019-05-06 │ 6739 │ ███████████████████████████████████████████████████████████████████▍ │ + 20. │ 2019-05-13 │ 6600 │ ██████████████████████████████████████████████████████████████████ │ + 21. │ 2019-05-20 │ 6575 │ █████████████████████████████████████████████████████████████████▋ │ + 22. │ 2019-05-27 │ 6786 │ ███████████████████████████████████████████████████████████████████▋ │ + 23. │ 2019-06-03 │ 6872 │ ████████████████████████████████████████████████████████████████████▋ │ + 24. │ 2019-06-10 │ 7045 │ ██████████████████████████████████████████████████████████████████████▍ │ + 25. │ 2019-06-17 │ 7045 │ ██████████████████████████████████████████████████████████████████████▍ │ + 26. │ 2019-06-24 │ 6852 │ ████████████████████████████████████████████████████████████████████▌ │ + 27. │ 2019-07-01 │ 7248 │ ████████████████████████████████████████████████████████████████████████▍ │ + 28. │ 2019-07-08 │ 7284 │ ████████████████████████████████████████████████████████████████████████▋ │ + 29. │ 2019-07-15 │ 7142 │ ███████████████████████████████████████████████████████████████████████▍ │ + 30. │ 2019-07-22 │ 7108 │ ███████████████████████████████████████████████████████████████████████ │ + 31. │ 2019-07-29 │ 7251 │ ████████████████████████████████████████████████████████████████████████▌ │ + 32. │ 2019-08-05 │ 7403 │ ██████████████████████████████████████████████████████████████████████████ │ + 33. │ 2019-08-12 │ 7457 │ ██████████████████████████████████████████████████████████████████████████▌ │ + 34. │ 2019-08-19 │ 7502 │ ███████████████████████████████████████████████████████████████████████████ │ + 35. │ 2019-08-26 │ 7540 │ ███████████████████████████████████████████████████████████████████████████▍ │ + 36. │ 2019-09-02 │ 7237 │ ████████████████████████████████████████████████████████████████████████▎ │ + 37. │ 2019-09-09 │ 7328 │ █████████████████████████████████████████████████████████████████████████▎ │ + 38. │ 2019-09-16 │ 5566 │ ███████████████████████████████████████████████████████▋ │ + 39. │ 2019-09-23 │ 7049 │ ██████████████████████████████████████████████████████████████████████▍ │ + 40. │ 2019-09-30 │ 6880 │ ████████████████████████████████████████████████████████████████████▋ │ + 41. │ 2019-10-07 │ 6518 │ █████████████████████████████████████████████████████████████████▏ │ + 42. │ 2019-10-14 │ 6688 │ ██████████████████████████████████████████████████████████████████▊ │ + 43. │ 2019-10-21 │ 6667 │ ██████████████████████████████████████████████████████████████████▋ │ + 44. │ 2019-10-28 │ 6303 │ ███████████████████████████████████████████████████████████████ │ + 45. │ 2019-11-04 │ 6298 │ ██████████████████████████████████████████████████████████████▊ │ + 46. │ 2019-11-11 │ 6137 │ █████████████████████████████████████████████████████████████▎ │ + 47. │ 2019-11-18 │ 6051 │ ████████████████████████████████████████████████████████████▌ │ + 48. │ 2019-11-25 │ 5820 │ ██████████████████████████████████████████████████████████▏ │ + 49. │ 2019-12-02 │ 5942 │ ███████████████████████████████████████████████████████████▍ │ + 50. │ 2019-12-09 │ 4891 │ ████████████████████████████████████████████████▊ │ + 51. │ 2019-12-16 │ 5682 │ ████████████████████████████████████████████████████████▋ │ + 52. │ 2019-12-23 │ 6111 │ █████████████████████████████████████████████████████████████ │ + 53. │ 2019-12-30 │ 5870 │ ██████████████████████████████████████████████████████████▋ │ + 54. │ 2020-01-06 │ 5953 │ ███████████████████████████████████████████████████████████▌ │ + 55. │ 2020-01-13 │ 5698 │ ████████████████████████████████████████████████████████▊ │ + 56. │ 2020-01-20 │ 5339 │ █████████████████████████████████████████████████████▍ │ + 57. │ 2020-01-27 │ 5566 │ ███████████████████████████████████████████████████████▋ │ + 58. │ 2020-02-03 │ 5801 │ ██████████████████████████████████████████████████████████ │ + 59. │ 2020-02-10 │ 5692 │ ████████████████████████████████████████████████████████▊ │ + 60. │ 2020-02-17 │ 5912 │ ███████████████████████████████████████████████████████████ │ + 61. │ 2020-02-24 │ 6031 │ ████████████████████████████████████████████████████████████▎ │ + 62. │ 2020-03-02 │ 6105 │ █████████████████████████████████████████████████████████████ │ + 63. │ 2020-03-09 │ 5823 │ ██████████████████████████████████████████████████████████▏ │ + 64. │ 2020-03-16 │ 4659 │ ██████████████████████████████████████████████▌ │ + 65. │ 2020-03-23 │ 3720 │ █████████████████████████████████████▏ │ + 66. │ 2020-03-30 │ 1720 │ █████████████████▏ │ + 67. │ 2020-04-06 │ 849 │ ████████▍ │ + 68. │ 2020-04-13 │ 710 │ ███████ │ + 69. │ 2020-04-20 │ 725 │ ███████▏ │ + 70. │ 2020-04-27 │ 920 │ █████████▏ │ + 71. │ 2020-05-04 │ 859 │ ████████▌ │ + 72. │ 2020-05-11 │ 1047 │ ██████████▍ │ + 73. │ 2020-05-18 │ 1135 │ ███████████▎ │ + 74. │ 2020-05-25 │ 1266 │ ████████████▋ │ + 75. │ 2020-06-01 │ 1793 │ █████████████████▊ │ + 76. │ 2020-06-08 │ 1979 │ ███████████████████▋ │ + 77. │ 2020-06-15 │ 2297 │ ██████████████████████▊ │ + 78. │ 2020-06-22 │ 2788 │ ███████████████████████████▊ │ + 79. │ 2020-06-29 │ 3389 │ █████████████████████████████████▊ │ + 80. │ 2020-07-06 │ 3545 │ ███████████████████████████████████▍ │ + 81. │ 2020-07-13 │ 3569 │ ███████████████████████████████████▋ │ + 82. │ 2020-07-20 │ 3784 │ █████████████████████████████████████▋ │ + 83. │ 2020-07-27 │ 3960 │ ███████████████████████████████████████▌ │ + 84. │ 2020-08-03 │ 4323 │ ███████████████████████████████████████████▏ │ + 85. │ 2020-08-10 │ 4581 │ █████████████████████████████████████████████▋ │ + 86. │ 2020-08-17 │ 4791 │ ███████████████████████████████████████████████▊ │ + 87. │ 2020-08-24 │ 4928 │ █████████████████████████████████████████████████▎ │ + 88. │ 2020-08-31 │ 4687 │ ██████████████████████████████████████████████▋ │ + 89. │ 2020-09-07 │ 4643 │ ██████████████████████████████████████████████▍ │ + 90. │ 2020-09-14 │ 4594 │ █████████████████████████████████████████████▊ │ + 91. │ 2020-09-21 │ 4478 │ ████████████████████████████████████████████▋ │ + 92. │ 2020-09-28 │ 4382 │ ███████████████████████████████████████████▋ │ + 93. │ 2020-10-05 │ 4261 │ ██████████████████████████████████████████▌ │ + 94. │ 2020-10-12 │ 4243 │ ██████████████████████████████████████████▍ │ + 95. │ 2020-10-19 │ 3941 │ ███████████████████████████████████████▍ │ + 96. │ 2020-10-26 │ 3616 │ ████████████████████████████████████▏ │ + 97. │ 2020-11-02 │ 3586 │ ███████████████████████████████████▋ │ + 98. │ 2020-11-09 │ 3403 │ ██████████████████████████████████ │ + 99. │ 2020-11-16 │ 3336 │ █████████████████████████████████▎ │ +100. │ 2020-11-23 │ 3230 │ ████████████████████████████████▎ │ +101. │ 2020-11-30 │ 3183 │ ███████████████████████████████▋ │ +102. │ 2020-12-07 │ 3285 │ ████████████████████████████████▋ │ +103. │ 2020-12-14 │ 3367 │ █████████████████████████████████▋ │ +104. │ 2020-12-21 │ 3748 │ █████████████████████████████████████▍ │ +105. │ 2020-12-28 │ 3986 │ ███████████████████████████████████████▋ │ +106. │ 2021-01-04 │ 3906 │ ███████████████████████████████████████ │ +107. │ 2021-01-11 │ 3425 │ ██████████████████████████████████▎ │ +108. │ 2021-01-18 │ 3144 │ ███████████████████████████████▍ │ +109. │ 2021-01-25 │ 3115 │ ███████████████████████████████▏ │ +110. │ 2021-02-01 │ 3285 │ ████████████████████████████████▋ │ +111. │ 2021-02-08 │ 3321 │ █████████████████████████████████▏ │ +112. │ 2021-02-15 │ 3475 │ ██████████████████████████████████▋ │ +113. │ 2021-02-22 │ 3549 │ ███████████████████████████████████▍ │ +114. │ 2021-03-01 │ 3755 │ █████████████████████████████████████▌ │ +115. │ 2021-03-08 │ 3080 │ ██████████████████████████████▋ │ +116. │ 2021-03-15 │ 3789 │ █████████████████████████████████████▊ │ +117. │ 2021-03-22 │ 3804 │ ██████████████████████████████████████ │ +118. │ 2021-03-29 │ 4238 │ ██████████████████████████████████████████▍ │ +119. │ 2021-04-05 │ 4307 │ ███████████████████████████████████████████ │ +120. │ 2021-04-12 │ 4225 │ ██████████████████████████████████████████▎ │ +121. │ 2021-04-19 │ 4391 │ ███████████████████████████████████████████▊ │ +122. │ 2021-04-26 │ 4868 │ ████████████████████████████████████████████████▋ │ +123. │ 2021-05-03 │ 4977 │ █████████████████████████████████████████████████▋ │ +124. │ 2021-05-10 │ 5164 │ ███████████████████████████████████████████████████▋ │ +125. │ 2021-05-17 │ 4986 │ █████████████████████████████████████████████████▋ │ +126. │ 2021-05-24 │ 5024 │ ██████████████████████████████████████████████████▏ │ +127. │ 2021-05-31 │ 4824 │ ████████████████████████████████████████████████▏ │ +128. │ 2021-06-07 │ 5652 │ ████████████████████████████████████████████████████████▌ │ +129. │ 2021-06-14 │ 5613 │ ████████████████████████████████████████████████████████▏ │ +130. │ 2021-06-21 │ 6061 │ ████████████████████████████████████████████████████████████▌ │ +131. │ 2021-06-28 │ 2554 │ █████████████████████████▌ │ + └────────────┴──────┴──────────────────────────────────────────────────────────────────────────────┘ +``` + +### Online Playground {#playground} + +Вы можете протестировать другие запросы к этому набору данным с помощью интерактивного ресурса [Online Playground](https://gh-api.clickhouse.tech/play?user=play). Например, [вот так](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICBvcmlnaW4sCiAgICBjb3VudCgpLAogICAgcm91bmQoYXZnKGdlb0Rpc3RhbmNlKGxvbmdpdHVkZV8xLCBsYXRpdHVkZV8xLCBsb25naXR1ZGVfMiwgbGF0aXR1ZGVfMikpKSBBUyBkaXN0YW5jZSwKICAgIGJhcihkaXN0YW5jZSwgMCwgMTAwMDAwMDAsIDEwMCkgQVMgYmFyCkZST00gb3BlbnNreQpXSEVSRSBvcmlnaW4gIT0gJycKR1JPVVAgQlkgb3JpZ2luCk9SREVSIEJZIGNvdW50KCkgREVTQwpMSU1JVCAxMDA=). Однако обратите внимание, что здесь нельзя создавать временные таблицы. + diff --git a/docs/ru/getting-started/example-datasets/recipes.md b/docs/ru/getting-started/example-datasets/recipes.md index 75e385150e8..3ec06320ed7 100644 --- a/docs/ru/getting-started/example-datasets/recipes.md +++ b/docs/ru/getting-started/example-datasets/recipes.md @@ -337,6 +337,6 @@ WHERE title = 'Chocolate-Strawberry-Orange Wedding Cake'; ### Online Playground -Этот набор данных доступен в [Online Playground](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUCiAgICBhcnJheUpvaW4oTkVSKSBBUyBrLAogICAgY291bnQoKSBBUyBjCkZST00gcmVjaXBlcwpHUk9VUCBCWSBrCk9SREVSIEJZIGMgREVTQwpMSU1JVCA1MA==). +Этот набор данных доступен в [Online Playground](https://gh-api.clickhouse.com/play?user=play#U0VMRUNUCiAgICBhcnJheUpvaW4oTkVSKSBBUyBrLAogICAgY291bnQoKSBBUyBjCkZST00gcmVjaXBlcwpHUk9VUCBCWSBrCk9SREVSIEJZIGMgREVTQwpMSU1JVCA1MA==). -[Оригинальная статья](https://clickhouse.tech/docs/ru/getting-started/example-datasets/recipes/) +[Оригинальная статья](https://clickhouse.com/docs/ru/getting-started/example-datasets/recipes/) diff --git a/docs/ru/getting-started/example-datasets/star-schema.md b/docs/ru/getting-started/example-datasets/star-schema.md index f7502e8409d..d9a875752dd 100644 --- a/docs/ru/getting-started/example-datasets/star-schema.md +++ b/docs/ru/getting-started/example-datasets/star-schema.md @@ -365,4 +365,4 @@ ORDER BY P_BRAND ASC; ``` -[Original article](https://clickhouse.tech/docs/en/getting_started/example_datasets/star_schema/) +[Original article](https://clickhouse.com/docs/en/getting_started/example_datasets/star_schema/) diff --git a/docs/ru/getting-started/example-datasets/uk-price-paid.md b/docs/ru/getting-started/example-datasets/uk-price-paid.md new file mode 100644 index 00000000000..1a0991015bd --- /dev/null +++ b/docs/ru/getting-started/example-datasets/uk-price-paid.md @@ -0,0 +1,650 @@ +--- +toc_priority: 20 +toc_title: Набор данных о стоимости недвижимости в Великобритании +--- + +# Набор данных о стоимости недвижимости в Великобритании {#uk-property-price-paid} + +Набор содержит данные о стоимости недвижимости в Англии и Уэльсе. Данные доступны с 1995 года. +Размер набора данных в несжатом виде составляет около 4 GiB, а в ClickHouse он займет около 278 MiB. + +Источник: https://www.gov.uk/government/statistical-data-sets/price-paid-data-downloads +Описание полей таблицы: https://www.gov.uk/guidance/about-the-price-paid-data + +Набор содержит данные HM Land Registry data © Crown copyright and database right 2021. Эти данные лицензированы в соответствии с Open Government Licence v3.0. + +## Загрузите набор данных {#download-dataset} + +Выполните команду: + +```bash +wget http://prod.publicdata.landregistry.gov.uk.s3-website-eu-west-1.amazonaws.com/pp-complete.csv +``` + +Загрузка займет около 2 минут при хорошем подключении к интернету. + +## Создайте таблицу {#create-table} + +```sql +CREATE TABLE uk_price_paid +( + price UInt32, + date Date, + postcode1 LowCardinality(String), + postcode2 LowCardinality(String), + type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0), + is_new UInt8, + duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0), + addr1 String, + addr2 String, + street LowCardinality(String), + locality LowCardinality(String), + town LowCardinality(String), + district LowCardinality(String), + county LowCardinality(String), + category UInt8 +) ENGINE = MergeTree ORDER BY (postcode1, postcode2, addr1, addr2); +``` + +## Обработайте и импортируйте данные {#preprocess-import-data} + +В этом примере используется `clickhouse-local` для предварительной обработки данных и `clickhouse-client` для импорта данных. + +Указывается структура исходных данных CSV-файла и запрос для предварительной обработки данных с помощью `clickhouse-local`. + +Предварительная обработка включает: +- разделение почтового индекса на два разных столбца `postcode1` и `postcode2`, что лучше подходит для хранения данных и выполнения запросов к ним; +- преобразование поля `time` в дату, поскольку оно содержит только время 00:00; +- поле [UUid](../../sql-reference/data-types/uuid.md) игнорируется, потому что оно не будет использовано для анализа; +- преобразование полей `type` и `duration` в более читаемые поля типа `Enum` с помощью функции [transform](../../sql-reference/functions/other-functions.md#transform); +- преобразование полей `is_new` и `category` из односимвольной строки (`Y`/`N` и `A`/`B`) в поле [UInt8](../../sql-reference/data-types/int-uint.md#uint8-uint16-uint32-uint64-uint256-int8-int16-int32-int64-int128-int256) со значениями 0 и 1 соответственно. + +Обработанные данные передаются в `clickhouse-client` и импортируются в таблицу ClickHouse потоковым способом. + +```bash +clickhouse-local --input-format CSV --structure ' + uuid String, + price UInt32, + time DateTime, + postcode String, + a String, + b String, + c String, + addr1 String, + addr2 String, + street String, + locality String, + town String, + district String, + county String, + d String, + e String +' --query " + WITH splitByChar(' ', postcode) AS p + SELECT + price, + toDate(time) AS date, + p[1] AS postcode1, + p[2] AS postcode2, + transform(a, ['T', 'S', 'D', 'F', 'O'], ['terraced', 'semi-detached', 'detached', 'flat', 'other']) AS type, + b = 'Y' AS is_new, + transform(c, ['F', 'L', 'U'], ['freehold', 'leasehold', 'unknown']) AS duration, + addr1, + addr2, + street, + locality, + town, + district, + county, + d = 'B' AS category + FROM table" --date_time_input_format best_effort < pp-complete.csv | clickhouse-client --query "INSERT INTO uk_price_paid FORMAT TSV" +``` + +Выполнение запроса займет около 40 секунд. + +## Проверьте импортированные данные {#validate-data} + +Запрос: + +```sql +SELECT count() FROM uk_price_paid; +``` + +Результат: + +```text +┌──count()─┐ +│ 26321785 │ +└──────────┘ +``` + +Размер набора данных в ClickHouse составляет всего 278 MiB, проверьте это. + +Запрос: + +```sql +SELECT formatReadableSize(total_bytes) FROM system.tables WHERE name = 'uk_price_paid'; +``` + +Результат: + +```text +┌─formatReadableSize(total_bytes)─┐ +│ 278.80 MiB │ +└─────────────────────────────────┘ +``` + +## Примеры запросов {#run-queries} + +### Запрос 1. Средняя цена за год {#average-price} + +Запрос: + +```sql +SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 1000000, 80) FROM uk_price_paid GROUP BY year ORDER BY year; +``` + +Результат: + +```text +┌─year─┬──price─┬─bar(round(avg(price)), 0, 1000000, 80)─┐ +│ 1995 │ 67932 │ █████▍ │ +│ 1996 │ 71505 │ █████▋ │ +│ 1997 │ 78532 │ ██████▎ │ +│ 1998 │ 85436 │ ██████▋ │ +│ 1999 │ 96037 │ ███████▋ │ +│ 2000 │ 107479 │ ████████▌ │ +│ 2001 │ 118885 │ █████████▌ │ +│ 2002 │ 137941 │ ███████████ │ +│ 2003 │ 155889 │ ████████████▍ │ +│ 2004 │ 178885 │ ██████████████▎ │ +│ 2005 │ 189351 │ ███████████████▏ │ +│ 2006 │ 203528 │ ████████████████▎ │ +│ 2007 │ 219378 │ █████████████████▌ │ +│ 2008 │ 217056 │ █████████████████▎ │ +│ 2009 │ 213419 │ █████████████████ │ +│ 2010 │ 236109 │ ██████████████████▊ │ +│ 2011 │ 232805 │ ██████████████████▌ │ +│ 2012 │ 238367 │ ███████████████████ │ +│ 2013 │ 256931 │ ████████████████████▌ │ +│ 2014 │ 279915 │ ██████████████████████▍ │ +│ 2015 │ 297266 │ ███████████████████████▋ │ +│ 2016 │ 313201 │ █████████████████████████ │ +│ 2017 │ 346097 │ ███████████████████████████▋ │ +│ 2018 │ 350116 │ ████████████████████████████ │ +│ 2019 │ 351013 │ ████████████████████████████ │ +│ 2020 │ 369420 │ █████████████████████████████▌ │ +│ 2021 │ 386903 │ ██████████████████████████████▊ │ +└──────┴────────┴────────────────────────────────────────┘ +``` + +### Запрос 2. Средняя цена за год в Лондоне {#average-price-london} + +Запрос: + +```sql +SELECT toYear(date) AS year, round(avg(price)) AS price, bar(price, 0, 2000000, 100) FROM uk_price_paid WHERE town = 'LONDON' GROUP BY year ORDER BY year; +``` + +Результат: + +```text +┌─year─┬───price─┬─bar(round(avg(price)), 0, 2000000, 100)───────────────┐ +│ 1995 │ 109116 │ █████▍ │ +│ 1996 │ 118667 │ █████▊ │ +│ 1997 │ 136518 │ ██████▋ │ +│ 1998 │ 152983 │ ███████▋ │ +│ 1999 │ 180637 │ █████████ │ +│ 2000 │ 215838 │ ██████████▋ │ +│ 2001 │ 232994 │ ███████████▋ │ +│ 2002 │ 263670 │ █████████████▏ │ +│ 2003 │ 278394 │ █████████████▊ │ +│ 2004 │ 304666 │ ███████████████▏ │ +│ 2005 │ 322875 │ ████████████████▏ │ +│ 2006 │ 356191 │ █████████████████▋ │ +│ 2007 │ 404054 │ ████████████████████▏ │ +│ 2008 │ 420741 │ █████████████████████ │ +│ 2009 │ 427753 │ █████████████████████▍ │ +│ 2010 │ 480306 │ ████████████████████████ │ +│ 2011 │ 496274 │ ████████████████████████▋ │ +│ 2012 │ 519442 │ █████████████████████████▊ │ +│ 2013 │ 616212 │ ██████████████████████████████▋ │ +│ 2014 │ 724154 │ ████████████████████████████████████▏ │ +│ 2015 │ 792129 │ ███████████████████████████████████████▌ │ +│ 2016 │ 843655 │ ██████████████████████████████████████████▏ │ +│ 2017 │ 982642 │ █████████████████████████████████████████████████▏ │ +│ 2018 │ 1016835 │ ██████████████████████████████████████████████████▋ │ +│ 2019 │ 1042849 │ ████████████████████████████████████████████████████▏ │ +│ 2020 │ 1011889 │ ██████████████████████████████████████████████████▌ │ +│ 2021 │ 960343 │ ████████████████████████████████████████████████ │ +└──────┴─────────┴───────────────────────────────────────────────────────┘ +``` + +Что-то случилось в 2013 году. Я понятия не имею. Может быть, вы имеете представление о том, что произошло в 2020 году? + +### Запрос 3. Самые дорогие районы {#most-expensive-neighborhoods} + +Запрос: + +```sql +SELECT + town, + district, + count() AS c, + round(avg(price)) AS price, + bar(price, 0, 5000000, 100) +FROM uk_price_paid +WHERE date >= '2020-01-01' +GROUP BY + town, + district +HAVING c >= 100 +ORDER BY price DESC +LIMIT 100; +``` + +Результат: + +```text + +┌─town─────────────────┬─district───────────────┬────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)────────────────────────────┐ +│ LONDON │ CITY OF WESTMINSTER │ 3606 │ 3280239 │ █████████████████████████████████████████████████████████████████▌ │ +│ LONDON │ CITY OF LONDON │ 274 │ 3160502 │ ███████████████████████████████████████████████████████████████▏ │ +│ LONDON │ KENSINGTON AND CHELSEA │ 2550 │ 2308478 │ ██████████████████████████████████████████████▏ │ +│ LEATHERHEAD │ ELMBRIDGE │ 114 │ 1897407 │ █████████████████████████████████████▊ │ +│ LONDON │ CAMDEN │ 3033 │ 1805404 │ ████████████████████████████████████ │ +│ VIRGINIA WATER │ RUNNYMEDE │ 156 │ 1753247 │ ███████████████████████████████████ │ +│ WINDLESHAM │ SURREY HEATH │ 108 │ 1677613 │ █████████████████████████████████▌ │ +│ THORNTON HEATH │ CROYDON │ 546 │ 1671721 │ █████████████████████████████████▍ │ +│ BARNET │ ENFIELD │ 124 │ 1505840 │ ██████████████████████████████ │ +│ COBHAM │ ELMBRIDGE │ 387 │ 1237250 │ ████████████████████████▋ │ +│ LONDON │ ISLINGTON │ 2668 │ 1236980 │ ████████████████████████▋ │ +│ OXFORD │ SOUTH OXFORDSHIRE │ 321 │ 1220907 │ ████████████████████████▍ │ +│ LONDON │ RICHMOND UPON THAMES │ 704 │ 1215551 │ ████████████████████████▎ │ +│ LONDON │ HOUNSLOW │ 671 │ 1207493 │ ████████████████████████▏ │ +│ ASCOT │ WINDSOR AND MAIDENHEAD │ 407 │ 1183299 │ ███████████████████████▋ │ +│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 330 │ 1175615 │ ███████████████████████▌ │ +│ RICHMOND │ RICHMOND UPON THAMES │ 874 │ 1110444 │ ██████████████████████▏ │ +│ LONDON │ HAMMERSMITH AND FULHAM │ 3086 │ 1053983 │ █████████████████████ │ +│ SURBITON │ ELMBRIDGE │ 100 │ 1011800 │ ████████████████████▏ │ +│ RADLETT │ HERTSMERE │ 283 │ 1011712 │ ████████████████████▏ │ +│ SALCOMBE │ SOUTH HAMS │ 127 │ 1011624 │ ████████████████████▏ │ +│ WEYBRIDGE │ ELMBRIDGE │ 655 │ 1007265 │ ████████████████████▏ │ +│ ESHER │ ELMBRIDGE │ 485 │ 986581 │ ███████████████████▋ │ +│ LEATHERHEAD │ GUILDFORD │ 202 │ 977320 │ ███████████████████▌ │ +│ BURFORD │ WEST OXFORDSHIRE │ 111 │ 966893 │ ███████████████████▎ │ +│ BROCKENHURST │ NEW FOREST │ 129 │ 956675 │ ███████████████████▏ │ +│ HINDHEAD │ WAVERLEY │ 137 │ 953753 │ ███████████████████ │ +│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 419 │ 951121 │ ███████████████████ │ +│ EAST MOLESEY │ ELMBRIDGE │ 192 │ 936769 │ ██████████████████▋ │ +│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 146 │ 925515 │ ██████████████████▌ │ +│ LONDON │ TOWER HAMLETS │ 4388 │ 918304 │ ██████████████████▎ │ +│ OLNEY │ MILTON KEYNES │ 235 │ 910646 │ ██████████████████▏ │ +│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 540 │ 902418 │ ██████████████████ │ +│ LONDON │ SOUTHWARK │ 3885 │ 892997 │ █████████████████▋ │ +│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 960 │ 885969 │ █████████████████▋ │ +│ LONDON │ EALING │ 2658 │ 871755 │ █████████████████▍ │ +│ CRANBROOK │ TUNBRIDGE WELLS │ 431 │ 862348 │ █████████████████▏ │ +│ LONDON │ MERTON │ 2099 │ 859118 │ █████████████████▏ │ +│ BELVEDERE │ BEXLEY │ 346 │ 842423 │ ████████████████▋ │ +│ GUILDFORD │ WAVERLEY │ 143 │ 841277 │ ████████████████▋ │ +│ HARPENDEN │ ST ALBANS │ 657 │ 841216 │ ████████████████▋ │ +│ LONDON │ HACKNEY │ 3307 │ 837090 │ ████████████████▋ │ +│ LONDON │ WANDSWORTH │ 6566 │ 832663 │ ████████████████▋ │ +│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 123 │ 824299 │ ████████████████▍ │ +│ KINGS LANGLEY │ DACORUM │ 145 │ 821331 │ ████████████████▍ │ +│ BERKHAMSTED │ DACORUM │ 543 │ 818415 │ ████████████████▎ │ +│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 226 │ 802807 │ ████████████████ │ +│ BILLINGSHURST │ CHICHESTER │ 144 │ 797829 │ ███████████████▊ │ +│ WOKING │ GUILDFORD │ 176 │ 793494 │ ███████████████▋ │ +│ STOCKBRIDGE │ TEST VALLEY │ 178 │ 793269 │ ███████████████▋ │ +│ EPSOM │ REIGATE AND BANSTEAD │ 172 │ 791862 │ ███████████████▋ │ +│ TONBRIDGE │ TUNBRIDGE WELLS │ 360 │ 787876 │ ███████████████▋ │ +│ TEDDINGTON │ RICHMOND UPON THAMES │ 595 │ 786492 │ ███████████████▋ │ +│ TWICKENHAM │ RICHMOND UPON THAMES │ 1155 │ 786193 │ ███████████████▋ │ +│ LYNDHURST │ NEW FOREST │ 102 │ 785593 │ ███████████████▋ │ +│ LONDON │ LAMBETH │ 5228 │ 774574 │ ███████████████▍ │ +│ LONDON │ BARNET │ 3955 │ 773259 │ ███████████████▍ │ +│ OXFORD │ VALE OF WHITE HORSE │ 353 │ 772088 │ ███████████████▍ │ +│ TONBRIDGE │ MAIDSTONE │ 305 │ 770740 │ ███████████████▍ │ +│ LUTTERWORTH │ HARBOROUGH │ 538 │ 768634 │ ███████████████▎ │ +│ WOODSTOCK │ WEST OXFORDSHIRE │ 140 │ 766037 │ ███████████████▎ │ +│ MIDHURST │ CHICHESTER │ 257 │ 764815 │ ███████████████▎ │ +│ MARLOW │ BUCKINGHAMSHIRE │ 327 │ 761876 │ ███████████████▏ │ +│ LONDON │ NEWHAM │ 3237 │ 761784 │ ███████████████▏ │ +│ ALDERLEY EDGE │ CHESHIRE EAST │ 178 │ 757318 │ ███████████████▏ │ +│ LUTON │ CENTRAL BEDFORDSHIRE │ 212 │ 754283 │ ███████████████ │ +│ PETWORTH │ CHICHESTER │ 154 │ 754220 │ ███████████████ │ +│ ALRESFORD │ WINCHESTER │ 219 │ 752718 │ ███████████████ │ +│ POTTERS BAR │ WELWYN HATFIELD │ 174 │ 748465 │ ██████████████▊ │ +│ HASLEMERE │ CHICHESTER │ 128 │ 746907 │ ██████████████▊ │ +│ TADWORTH │ REIGATE AND BANSTEAD │ 502 │ 743252 │ ██████████████▋ │ +│ THAMES DITTON │ ELMBRIDGE │ 244 │ 741913 │ ██████████████▋ │ +│ REIGATE │ REIGATE AND BANSTEAD │ 581 │ 738198 │ ██████████████▋ │ +│ BOURNE END │ BUCKINGHAMSHIRE │ 138 │ 735190 │ ██████████████▋ │ +│ SEVENOAKS │ SEVENOAKS │ 1156 │ 730018 │ ██████████████▌ │ +│ OXTED │ TANDRIDGE │ 336 │ 729123 │ ██████████████▌ │ +│ INGATESTONE │ BRENTWOOD │ 166 │ 728103 │ ██████████████▌ │ +│ LONDON │ BRENT │ 2079 │ 720605 │ ██████████████▍ │ +│ LONDON │ HARINGEY │ 3216 │ 717780 │ ██████████████▎ │ +│ PURLEY │ CROYDON │ 575 │ 716108 │ ██████████████▎ │ +│ WELWYN │ WELWYN HATFIELD │ 222 │ 710603 │ ██████████████▏ │ +│ RICKMANSWORTH │ THREE RIVERS │ 798 │ 704571 │ ██████████████ │ +│ BANSTEAD │ REIGATE AND BANSTEAD │ 401 │ 701293 │ ██████████████ │ +│ CHIGWELL │ EPPING FOREST │ 261 │ 701203 │ ██████████████ │ +│ PINNER │ HARROW │ 528 │ 698885 │ █████████████▊ │ +│ HASLEMERE │ WAVERLEY │ 280 │ 696659 │ █████████████▊ │ +│ SLOUGH │ BUCKINGHAMSHIRE │ 396 │ 694917 │ █████████████▊ │ +│ WALTON-ON-THAMES │ ELMBRIDGE │ 946 │ 692395 │ █████████████▋ │ +│ READING │ SOUTH OXFORDSHIRE │ 318 │ 691988 │ █████████████▋ │ +│ NORTHWOOD │ HILLINGDON │ 271 │ 690643 │ █████████████▋ │ +│ FELTHAM │ HOUNSLOW │ 763 │ 688595 │ █████████████▋ │ +│ ASHTEAD │ MOLE VALLEY │ 303 │ 687923 │ █████████████▋ │ +│ BARNET │ BARNET │ 975 │ 686980 │ █████████████▋ │ +│ WOKING │ SURREY HEATH │ 283 │ 686669 │ █████████████▋ │ +│ MALMESBURY │ WILTSHIRE │ 323 │ 683324 │ █████████████▋ │ +│ AMERSHAM │ BUCKINGHAMSHIRE │ 496 │ 680962 │ █████████████▌ │ +│ CHISLEHURST │ BROMLEY │ 430 │ 680209 │ █████████████▌ │ +│ HYTHE │ FOLKESTONE AND HYTHE │ 490 │ 676908 │ █████████████▌ │ +│ MAYFIELD │ WEALDEN │ 101 │ 676210 │ █████████████▌ │ +│ ASCOT │ BRACKNELL FOREST │ 168 │ 676004 │ █████████████▌ │ +└──────────────────────┴────────────────────────┴──────┴─────────┴────────────────────────────────────────────────────────────────────┘ +``` + +## Ускорьте запросы с помощью проекций {#speedup-with-projections} + +[Проекции](../../sql-reference/statements/alter/projection.md) позволяют повысить скорость запросов за счет хранения предварительно агрегированных данных. + +### Создайте проекцию {#build-projection} + +Создайте агрегирующую проекцию по параметрам `toYear(date)`, `district`, `town`: + +```sql +ALTER TABLE uk_price_paid + ADD PROJECTION projection_by_year_district_town + ( + SELECT + toYear(date), + district, + town, + avg(price), + sum(price), + count() + GROUP BY + toYear(date), + district, + town + ); +``` + +Заполните проекцию для текущих данных (иначе проекция будет создана только для добавляемых данных): + +```sql +ALTER TABLE uk_price_paid + MATERIALIZE PROJECTION projection_by_year_district_town +SETTINGS mutations_sync = 1; +``` + +## Проверьте производительность {#test-performance} + +Давайте выполним те же 3 запроса. + +[Включите](../../operations/settings/settings.md#allow-experimental-projection-optimization) поддержку проекций: + +```sql +SET allow_experimental_projection_optimization = 1; +``` + +### Запрос 1. Средняя цена за год {#average-price-projections} + +Запрос: + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 1000000, 80) +FROM uk_price_paid +GROUP BY year +ORDER BY year ASC; +``` + +Результат: + +```text +┌─year─┬──price─┬─bar(round(avg(price)), 0, 1000000, 80)─┐ +│ 1995 │ 67932 │ █████▍ │ +│ 1996 │ 71505 │ █████▋ │ +│ 1997 │ 78532 │ ██████▎ │ +│ 1998 │ 85436 │ ██████▋ │ +│ 1999 │ 96037 │ ███████▋ │ +│ 2000 │ 107479 │ ████████▌ │ +│ 2001 │ 118885 │ █████████▌ │ +│ 2002 │ 137941 │ ███████████ │ +│ 2003 │ 155889 │ ████████████▍ │ +│ 2004 │ 178885 │ ██████████████▎ │ +│ 2005 │ 189351 │ ███████████████▏ │ +│ 2006 │ 203528 │ ████████████████▎ │ +│ 2007 │ 219378 │ █████████████████▌ │ +│ 2008 │ 217056 │ █████████████████▎ │ +│ 2009 │ 213419 │ █████████████████ │ +│ 2010 │ 236109 │ ██████████████████▊ │ +│ 2011 │ 232805 │ ██████████████████▌ │ +│ 2012 │ 238367 │ ███████████████████ │ +│ 2013 │ 256931 │ ████████████████████▌ │ +│ 2014 │ 279915 │ ██████████████████████▍ │ +│ 2015 │ 297266 │ ███████████████████████▋ │ +│ 2016 │ 313201 │ █████████████████████████ │ +│ 2017 │ 346097 │ ███████████████████████████▋ │ +│ 2018 │ 350116 │ ████████████████████████████ │ +│ 2019 │ 351013 │ ████████████████████████████ │ +│ 2020 │ 369420 │ █████████████████████████████▌ │ +│ 2021 │ 386903 │ ██████████████████████████████▊ │ +└──────┴────────┴────────────────────────────────────────┘ +``` + +### Запрос 2. Средняя цена за год в Лондоне {#average-price-london-projections} + +Запрос: + +```sql +SELECT + toYear(date) AS year, + round(avg(price)) AS price, + bar(price, 0, 2000000, 100) +FROM uk_price_paid +WHERE town = 'LONDON' +GROUP BY year +ORDER BY year ASC; +``` + +Результат: + +```text +┌─year─┬───price─┬─bar(round(avg(price)), 0, 2000000, 100)───────────────┐ +│ 1995 │ 109116 │ █████▍ │ +│ 1996 │ 118667 │ █████▊ │ +│ 1997 │ 136518 │ ██████▋ │ +│ 1998 │ 152983 │ ███████▋ │ +│ 1999 │ 180637 │ █████████ │ +│ 2000 │ 215838 │ ██████████▋ │ +│ 2001 │ 232994 │ ███████████▋ │ +│ 2002 │ 263670 │ █████████████▏ │ +│ 2003 │ 278394 │ █████████████▊ │ +│ 2004 │ 304666 │ ███████████████▏ │ +│ 2005 │ 322875 │ ████████████████▏ │ +│ 2006 │ 356191 │ █████████████████▋ │ +│ 2007 │ 404054 │ ████████████████████▏ │ +│ 2008 │ 420741 │ █████████████████████ │ +│ 2009 │ 427753 │ █████████████████████▍ │ +│ 2010 │ 480306 │ ████████████████████████ │ +│ 2011 │ 496274 │ ████████████████████████▋ │ +│ 2012 │ 519442 │ █████████████████████████▊ │ +│ 2013 │ 616212 │ ██████████████████████████████▋ │ +│ 2014 │ 724154 │ ████████████████████████████████████▏ │ +│ 2015 │ 792129 │ ███████████████████████████████████████▌ │ +│ 2016 │ 843655 │ ██████████████████████████████████████████▏ │ +│ 2017 │ 982642 │ █████████████████████████████████████████████████▏ │ +│ 2018 │ 1016835 │ ██████████████████████████████████████████████████▋ │ +│ 2019 │ 1042849 │ ████████████████████████████████████████████████████▏ │ +│ 2020 │ 1011889 │ ██████████████████████████████████████████████████▌ │ +│ 2021 │ 960343 │ ████████████████████████████████████████████████ │ +└──────┴─────────┴───────────────────────────────────────────────────────┘ +``` + +### Запрос 3. Самые дорогие районы {#most-expensive-neighborhoods-projections} + +Условие (date >= '2020-01-01') необходимо изменить, чтобы оно соответствовало проекции (toYear(date) >= 2020). + +Запрос: + +```sql +SELECT + town, + district, + count() AS c, + round(avg(price)) AS price, + bar(price, 0, 5000000, 100) +FROM uk_price_paid +WHERE toYear(date) >= 2020 +GROUP BY + town, + district +HAVING c >= 100 +ORDER BY price DESC +LIMIT 100; +``` + +Результат: + +```text +┌─town─────────────────┬─district───────────────┬────c─┬───price─┬─bar(round(avg(price)), 0, 5000000, 100)────────────────────────────┐ +│ LONDON │ CITY OF WESTMINSTER │ 3606 │ 3280239 │ █████████████████████████████████████████████████████████████████▌ │ +│ LONDON │ CITY OF LONDON │ 274 │ 3160502 │ ███████████████████████████████████████████████████████████████▏ │ +│ LONDON │ KENSINGTON AND CHELSEA │ 2550 │ 2308478 │ ██████████████████████████████████████████████▏ │ +│ LEATHERHEAD │ ELMBRIDGE │ 114 │ 1897407 │ █████████████████████████████████████▊ │ +│ LONDON │ CAMDEN │ 3033 │ 1805404 │ ████████████████████████████████████ │ +│ VIRGINIA WATER │ RUNNYMEDE │ 156 │ 1753247 │ ███████████████████████████████████ │ +│ WINDLESHAM │ SURREY HEATH │ 108 │ 1677613 │ █████████████████████████████████▌ │ +│ THORNTON HEATH │ CROYDON │ 546 │ 1671721 │ █████████████████████████████████▍ │ +│ BARNET │ ENFIELD │ 124 │ 1505840 │ ██████████████████████████████ │ +│ COBHAM │ ELMBRIDGE │ 387 │ 1237250 │ ████████████████████████▋ │ +│ LONDON │ ISLINGTON │ 2668 │ 1236980 │ ████████████████████████▋ │ +│ OXFORD │ SOUTH OXFORDSHIRE │ 321 │ 1220907 │ ████████████████████████▍ │ +│ LONDON │ RICHMOND UPON THAMES │ 704 │ 1215551 │ ████████████████████████▎ │ +│ LONDON │ HOUNSLOW │ 671 │ 1207493 │ ████████████████████████▏ │ +│ ASCOT │ WINDSOR AND MAIDENHEAD │ 407 │ 1183299 │ ███████████████████████▋ │ +│ BEACONSFIELD │ BUCKINGHAMSHIRE │ 330 │ 1175615 │ ███████████████████████▌ │ +│ RICHMOND │ RICHMOND UPON THAMES │ 874 │ 1110444 │ ██████████████████████▏ │ +│ LONDON │ HAMMERSMITH AND FULHAM │ 3086 │ 1053983 │ █████████████████████ │ +│ SURBITON │ ELMBRIDGE │ 100 │ 1011800 │ ████████████████████▏ │ +│ RADLETT │ HERTSMERE │ 283 │ 1011712 │ ████████████████████▏ │ +│ SALCOMBE │ SOUTH HAMS │ 127 │ 1011624 │ ████████████████████▏ │ +│ WEYBRIDGE │ ELMBRIDGE │ 655 │ 1007265 │ ████████████████████▏ │ +│ ESHER │ ELMBRIDGE │ 485 │ 986581 │ ███████████████████▋ │ +│ LEATHERHEAD │ GUILDFORD │ 202 │ 977320 │ ███████████████████▌ │ +│ BURFORD │ WEST OXFORDSHIRE │ 111 │ 966893 │ ███████████████████▎ │ +│ BROCKENHURST │ NEW FOREST │ 129 │ 956675 │ ███████████████████▏ │ +│ HINDHEAD │ WAVERLEY │ 137 │ 953753 │ ███████████████████ │ +│ GERRARDS CROSS │ BUCKINGHAMSHIRE │ 419 │ 951121 │ ███████████████████ │ +│ EAST MOLESEY │ ELMBRIDGE │ 192 │ 936769 │ ██████████████████▋ │ +│ CHALFONT ST GILES │ BUCKINGHAMSHIRE │ 146 │ 925515 │ ██████████████████▌ │ +│ LONDON │ TOWER HAMLETS │ 4388 │ 918304 │ ██████████████████▎ │ +│ OLNEY │ MILTON KEYNES │ 235 │ 910646 │ ██████████████████▏ │ +│ HENLEY-ON-THAMES │ SOUTH OXFORDSHIRE │ 540 │ 902418 │ ██████████████████ │ +│ LONDON │ SOUTHWARK │ 3885 │ 892997 │ █████████████████▋ │ +│ KINGSTON UPON THAMES │ KINGSTON UPON THAMES │ 960 │ 885969 │ █████████████████▋ │ +│ LONDON │ EALING │ 2658 │ 871755 │ █████████████████▍ │ +│ CRANBROOK │ TUNBRIDGE WELLS │ 431 │ 862348 │ █████████████████▏ │ +│ LONDON │ MERTON │ 2099 │ 859118 │ █████████████████▏ │ +│ BELVEDERE │ BEXLEY │ 346 │ 842423 │ ████████████████▋ │ +│ GUILDFORD │ WAVERLEY │ 143 │ 841277 │ ████████████████▋ │ +│ HARPENDEN │ ST ALBANS │ 657 │ 841216 │ ████████████████▋ │ +│ LONDON │ HACKNEY │ 3307 │ 837090 │ ████████████████▋ │ +│ LONDON │ WANDSWORTH │ 6566 │ 832663 │ ████████████████▋ │ +│ MAIDENHEAD │ BUCKINGHAMSHIRE │ 123 │ 824299 │ ████████████████▍ │ +│ KINGS LANGLEY │ DACORUM │ 145 │ 821331 │ ████████████████▍ │ +│ BERKHAMSTED │ DACORUM │ 543 │ 818415 │ ████████████████▎ │ +│ GREAT MISSENDEN │ BUCKINGHAMSHIRE │ 226 │ 802807 │ ████████████████ │ +│ BILLINGSHURST │ CHICHESTER │ 144 │ 797829 │ ███████████████▊ │ +│ WOKING │ GUILDFORD │ 176 │ 793494 │ ███████████████▋ │ +│ STOCKBRIDGE │ TEST VALLEY │ 178 │ 793269 │ ███████████████▋ │ +│ EPSOM │ REIGATE AND BANSTEAD │ 172 │ 791862 │ ███████████████▋ │ +│ TONBRIDGE │ TUNBRIDGE WELLS │ 360 │ 787876 │ ███████████████▋ │ +│ TEDDINGTON │ RICHMOND UPON THAMES │ 595 │ 786492 │ ███████████████▋ │ +│ TWICKENHAM │ RICHMOND UPON THAMES │ 1155 │ 786193 │ ███████████████▋ │ +│ LYNDHURST │ NEW FOREST │ 102 │ 785593 │ ███████████████▋ │ +│ LONDON │ LAMBETH │ 5228 │ 774574 │ ███████████████▍ │ +│ LONDON │ BARNET │ 3955 │ 773259 │ ███████████████▍ │ +│ OXFORD │ VALE OF WHITE HORSE │ 353 │ 772088 │ ███████████████▍ │ +│ TONBRIDGE │ MAIDSTONE │ 305 │ 770740 │ ███████████████▍ │ +│ LUTTERWORTH │ HARBOROUGH │ 538 │ 768634 │ ███████████████▎ │ +│ WOODSTOCK │ WEST OXFORDSHIRE │ 140 │ 766037 │ ███████████████▎ │ +│ MIDHURST │ CHICHESTER │ 257 │ 764815 │ ███████████████▎ │ +│ MARLOW │ BUCKINGHAMSHIRE │ 327 │ 761876 │ ███████████████▏ │ +│ LONDON │ NEWHAM │ 3237 │ 761784 │ ███████████████▏ │ +│ ALDERLEY EDGE │ CHESHIRE EAST │ 178 │ 757318 │ ███████████████▏ │ +│ LUTON │ CENTRAL BEDFORDSHIRE │ 212 │ 754283 │ ███████████████ │ +│ PETWORTH │ CHICHESTER │ 154 │ 754220 │ ███████████████ │ +│ ALRESFORD │ WINCHESTER │ 219 │ 752718 │ ███████████████ │ +│ POTTERS BAR │ WELWYN HATFIELD │ 174 │ 748465 │ ██████████████▊ │ +│ HASLEMERE │ CHICHESTER │ 128 │ 746907 │ ██████████████▊ │ +│ TADWORTH │ REIGATE AND BANSTEAD │ 502 │ 743252 │ ██████████████▋ │ +│ THAMES DITTON │ ELMBRIDGE │ 244 │ 741913 │ ██████████████▋ │ +│ REIGATE │ REIGATE AND BANSTEAD │ 581 │ 738198 │ ██████████████▋ │ +│ BOURNE END │ BUCKINGHAMSHIRE │ 138 │ 735190 │ ██████████████▋ │ +│ SEVENOAKS │ SEVENOAKS │ 1156 │ 730018 │ ██████████████▌ │ +│ OXTED │ TANDRIDGE │ 336 │ 729123 │ ██████████████▌ │ +│ INGATESTONE │ BRENTWOOD │ 166 │ 728103 │ ██████████████▌ │ +│ LONDON │ BRENT │ 2079 │ 720605 │ ██████████████▍ │ +│ LONDON │ HARINGEY │ 3216 │ 717780 │ ██████████████▎ │ +│ PURLEY │ CROYDON │ 575 │ 716108 │ ██████████████▎ │ +│ WELWYN │ WELWYN HATFIELD │ 222 │ 710603 │ ██████████████▏ │ +│ RICKMANSWORTH │ THREE RIVERS │ 798 │ 704571 │ ██████████████ │ +│ BANSTEAD │ REIGATE AND BANSTEAD │ 401 │ 701293 │ ██████████████ │ +│ CHIGWELL │ EPPING FOREST │ 261 │ 701203 │ ██████████████ │ +│ PINNER │ HARROW │ 528 │ 698885 │ █████████████▊ │ +│ HASLEMERE │ WAVERLEY │ 280 │ 696659 │ █████████████▊ │ +│ SLOUGH │ BUCKINGHAMSHIRE │ 396 │ 694917 │ █████████████▊ │ +│ WALTON-ON-THAMES │ ELMBRIDGE │ 946 │ 692395 │ █████████████▋ │ +│ READING │ SOUTH OXFORDSHIRE │ 318 │ 691988 │ █████████████▋ │ +│ NORTHWOOD │ HILLINGDON │ 271 │ 690643 │ █████████████▋ │ +│ FELTHAM │ HOUNSLOW │ 763 │ 688595 │ █████████████▋ │ +│ ASHTEAD │ MOLE VALLEY │ 303 │ 687923 │ █████████████▋ │ +│ BARNET │ BARNET │ 975 │ 686980 │ █████████████▋ │ +│ WOKING │ SURREY HEATH │ 283 │ 686669 │ █████████████▋ │ +│ MALMESBURY │ WILTSHIRE │ 323 │ 683324 │ █████████████▋ │ +│ AMERSHAM │ BUCKINGHAMSHIRE │ 496 │ 680962 │ █████████████▌ │ +│ CHISLEHURST │ BROMLEY │ 430 │ 680209 │ █████████████▌ │ +│ HYTHE │ FOLKESTONE AND HYTHE │ 490 │ 676908 │ █████████████▌ │ +│ MAYFIELD │ WEALDEN │ 101 │ 676210 │ █████████████▌ │ +│ ASCOT │ BRACKNELL FOREST │ 168 │ 676004 │ █████████████▌ │ +└──────────────────────┴────────────────────────┴──────┴─────────┴────────────────────────────────────────────────────────────────────┘ +``` + +### Резюме {#summary} + +Все три запроса работают намного быстрее и читают меньшее количество строк. + +```text +Query 1 + +no projection: 27 rows in set. Elapsed: 0.158 sec. Processed 26.32 million rows, 157.93 MB (166.57 million rows/s., 999.39 MB/s.) + projection: 27 rows in set. Elapsed: 0.007 sec. Processed 105.96 thousand rows, 3.33 MB (14.58 million rows/s., 458.13 MB/s.) + + +Query 2 + +no projection: 27 rows in set. Elapsed: 0.163 sec. Processed 26.32 million rows, 80.01 MB (161.75 million rows/s., 491.64 MB/s.) + projection: 27 rows in set. Elapsed: 0.008 sec. Processed 105.96 thousand rows, 3.67 MB (13.29 million rows/s., 459.89 MB/s.) + +Query 3 + +no projection: 100 rows in set. Elapsed: 0.069 sec. Processed 26.32 million rows, 62.47 MB (382.13 million rows/s., 906.93 MB/s.) + projection: 100 rows in set. Elapsed: 0.029 sec. Processed 8.08 thousand rows, 511.08 KB (276.06 thousand rows/s., 17.47 MB/s.) +``` + +### Online Playground {#playground} + +Этот набор данных доступен в [Online Playground](https://gh-api.clickhouse.tech/play?user=play#U0VMRUNUIHRvd24sIGRpc3RyaWN0LCBjb3VudCgpIEFTIGMsIHJvdW5kKGF2ZyhwcmljZSkpIEFTIHByaWNlLCBiYXIocHJpY2UsIDAsIDUwMDAwMDAsIDEwMCkgRlJPTSB1a19wcmljZV9wYWlkIFdIRVJFIGRhdGUgPj0gJzIwMjAtMDEtMDEnIEdST1VQIEJZIHRvd24sIGRpc3RyaWN0IEhBVklORyBjID49IDEwMCBPUkRFUiBCWSBwcmljZSBERVNDIExJTUlUIDEwMA==). + diff --git a/docs/ru/getting-started/install.md b/docs/ru/getting-started/install.md index 1cbeb70ef96..5cb75c12155 100644 --- a/docs/ru/getting-started/install.md +++ b/docs/ru/getting-started/install.md @@ -27,10 +27,23 @@ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not su {% include 'install/deb.sh' %} ``` -Также эти пакеты можно скачать и установить вручную отсюда: https://repo.clickhouse.tech/deb/stable/main/. +Также эти пакеты можно скачать и установить вручную отсюда: https://repo.clickhouse.com/deb/stable/main/. Если вы хотите использовать наиболее свежую версию, замените `stable` на `testing` (рекомендуется для тестовых окружений). +Также вы можете вручную скачать и установить пакеты из [репозитория](https://repo.clickhouse.com/deb/stable/main/). + +#### Пакеты {#packages} + +- `clickhouse-common-static` — Устанавливает исполняемые файлы ClickHouse. +- `clickhouse-server` — Создает символические ссылки для `clickhouse-server` и устанавливает конфигурационные файлы. +- `clickhouse-client` — Создает символические ссылки для `clickhouse-client` и других клиентских инструментов и устанавливает конфигурационные файлы `clickhouse-client`. +- `clickhouse-common-static-dbg` — Устанавливает исполняемые файлы ClickHouse собранные с отладочной информацией. + +!!! attention "Внимание" + Если вам нужно установить ClickHouse определенной версии, вы должны установить все пакеты одной версии: + `sudo apt-get install clickhouse-server=21.8.5.7 clickhouse-client=21.8.5.7 clickhouse-common-static=21.8.5.7` + ### Из RPM пакетов {#from-rpm-packages} Команда ClickHouse в Яндексе рекомендует использовать официальные предкомпилированные `rpm` пакеты для CentOS, RedHat и всех остальных дистрибутивов Linux, основанных на rpm. @@ -39,8 +52,8 @@ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not su ``` bash sudo yum install yum-utils -sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG -sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64 +sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG +sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/stable/x86_64 ``` Для использования наиболее свежих версий нужно заменить `stable` на `testing` (рекомендуется для тестовых окружений). Также иногда доступен `prestable`. @@ -51,21 +64,21 @@ sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_6 sudo yum install clickhouse-server clickhouse-client ``` -Также есть возможность установить пакеты вручную, скачав отсюда: https://repo.clickhouse.tech/rpm/stable/x86_64. +Также есть возможность установить пакеты вручную, скачав отсюда: https://repo.clickhouse.com/rpm/stable/x86_64. ### Из Tgz архивов {#from-tgz-archives} Команда ClickHouse в Яндексе рекомендует использовать предкомпилированные бинарники из `tgz` архивов для всех дистрибутивов, где невозможна установка `deb` и `rpm` пакетов. -Интересующую версию архивов можно скачать вручную с помощью `curl` или `wget` из репозитория https://repo.clickhouse.tech/tgz/. +Интересующую версию архивов можно скачать вручную с помощью `curl` или `wget` из репозитория https://repo.clickhouse.com/tgz/. После этого архивы нужно распаковать и воспользоваться скриптами установки. Пример установки самой свежей версии: ``` bash export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1` -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-server-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-client-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-server-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-client-$LATEST_VERSION.tgz tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh @@ -85,14 +98,14 @@ sudo clickhouse-client-$LATEST_VERSION/install/doinst.sh ### Из Docker образа {#from-docker-image} -Для запуска ClickHouse в Docker нужно следовать инструкции на [Docker Hub](https://hub.docker.com/r/yandex/clickhouse-server/). Внутри образов используются официальные `deb` пакеты. +Для запуска ClickHouse в Docker нужно следовать инструкции на [Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/). Внутри образов используются официальные `deb` пакеты. ### Из единого бинарного файла {#from-single-binary} -Для установки ClickHouse под Linux можно использовать единый переносимый бинарный файл из последнего коммита ветки `master`: [https://builds.clickhouse.tech/master/amd64/clickhouse]. +Для установки ClickHouse под Linux можно использовать единый переносимый бинарный файл из последнего коммита ветки `master`: [https://builds.clickhouse.com/master/amd64/clickhouse]. ``` bash -curl -O 'https://builds.clickhouse.tech/master/amd64/clickhouse' && chmod a+x clickhouse +curl -O 'https://builds.clickhouse.com/master/amd64/clickhouse' && chmod a+x clickhouse sudo ./clickhouse install ``` @@ -100,9 +113,9 @@ sudo ./clickhouse install Для других операционных систем и архитектуры AArch64 сборки ClickHouse предоставляются в виде кросс-компилированного бинарного файла из последнего коммита ветки `master` (с задержкой в несколько часов). -- [macOS](https://builds.clickhouse.tech/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/macos/clickhouse' && chmod a+x ./clickhouse` -- [FreeBSD](https://builds.clickhouse.tech/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/freebsd/clickhouse' && chmod a+x ./clickhouse` -- [AArch64](https://builds.clickhouse.tech/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/aarch64/clickhouse' && chmod a+x ./clickhouse` +- [macOS](https://builds.clickhouse.com/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/macos/clickhouse' && chmod a+x ./clickhouse` +- [FreeBSD](https://builds.clickhouse.com/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/freebsd/clickhouse' && chmod a+x ./clickhouse` +- [AArch64](https://builds.clickhouse.com/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/aarch64/clickhouse' && chmod a+x ./clickhouse` После скачивания можно воспользоваться `clickhouse client` для подключения к серверу или `clickhouse local` для обработки локальных данных. @@ -182,4 +195,4 @@ SELECT 1 **Поздравляем, система работает!** -Для дальнейших экспериментов можно попробовать загрузить один из тестовых наборов данных или пройти [пошаговое руководство для начинающих](https://clickhouse.tech/tutorial.html). +Для дальнейших экспериментов можно попробовать загрузить один из тестовых наборов данных или пройти [пошаговое руководство для начинающих](https://clickhouse.com/tutorial.html). diff --git a/docs/ru/getting-started/playground.md b/docs/ru/getting-started/playground.md index d3101213b78..029fa706576 100644 --- a/docs/ru/getting-started/playground.md +++ b/docs/ru/getting-started/playground.md @@ -5,7 +5,7 @@ toc_title: Playground # ClickHouse Playground {#clickhouse-playground} -[ClickHouse Playground](https://play.clickhouse.tech) позволяет пользователям экспериментировать с ClickHouse, мгновенно выполняя запросы без настройки своего сервера или кластера. +[ClickHouse Playground](https://play.clickhouse.com) позволяет пользователям экспериментировать с ClickHouse, мгновенно выполняя запросы без настройки своего сервера или кластера. В Playground доступны несколько тестовых массивов данных, а также примеры запросов, которые показывают возможности ClickHouse. Кроме того, вы можете выбрать LTS релиз ClickHouse, который хотите протестировать. ClickHouse Playground дает возможность поработать с [Managed Service for ClickHouse](https://cloud.yandex.com/services/managed-clickhouse) в конфигурации m2.small (4 vCPU, 32 ГБ ОЗУ), которую предосталяет [Яндекс.Облако](https://cloud.yandex.com/). Дополнительную информацию об облачных провайдерах читайте в разделе [Поставщики облачных услуг ClickHouse](../commercial/cloud.md). @@ -16,15 +16,15 @@ ClickHouse Playground дает возможность поработать с [ | Параметр | Значение | |:--------------------|:----------------------------------------| -| Конечная точка HTTPS| `https://play-api.clickhouse.tech:8443` | -| Конечная точка TCP | `play-api.clickhouse.tech:9440` | +| Конечная точка HTTPS| `https://play-api.clickhouse.com:8443` | +| Конечная точка TCP | `play-api.clickhouse.com:9440` | | Пользователь | `playground` | | Пароль | `clickhouse` | Также можно подключаться к ClickHouse определённых релизов, чтобы протестировать их различия (порты и пользователь / пароль остаются неизменными): -- 20.3 LTS: `play-api-v20-3.clickhouse.tech` -- 19.14 LTS: `play-api-v19-14.clickhouse.tech` +- 20.3 LTS: `play-api-v20-3.clickhouse.com` +- 19.14 LTS: `play-api-v19-14.clickhouse.com` !!! note "Примечание" Для всех этих конечных точек требуется безопасное соединение TLS. @@ -46,13 +46,13 @@ ClickHouse Playground дает возможность поработать с [ Пример конечной точки HTTPS с `curl`: ``` bash -curl "https://play-api.clickhouse.tech:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" +curl "https://play-api.clickhouse.com:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" ``` Пример конечной точки TCP с [CLI](../interfaces/cli.md): ``` bash -clickhouse client --secure -h play-api.clickhouse.tech --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" +clickhouse client --secure -h play-api.clickhouse.com --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" ``` ## Детали реализации {#implementation-details} diff --git a/docs/ru/getting-started/tutorial.md b/docs/ru/getting-started/tutorial.md index 68b3e4dbae7..6deb1166602 100644 --- a/docs/ru/getting-started/tutorial.md +++ b/docs/ru/getting-started/tutorial.md @@ -85,8 +85,8 @@ Now it’s time to fill our ClickHouse server with some sample data. In this tut ### Download and Extract Table Data {#download-and-extract-table-data} ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv ``` The extracted files are about 10GB in size. @@ -659,4 +659,4 @@ INSERT INTO tutorial.hits_replica SELECT * FROM tutorial.hits_local; Replication operates in multi-master mode. Data can be loaded into any replica, and the system then syncs it with other instances automatically. Replication is asynchronous so at a given moment, not all replicas may contain recently inserted data. At least one replica should be up to allow data ingestion. Others will sync up data and repair consistency once they will become active again. Note that this approach allows for the low possibility of a loss of recently inserted data. -[Original article](https://clickhouse.tech/docs/en/getting_started/tutorial/) +[Original article](https://clickhouse.com/docs/en/getting_started/tutorial/) diff --git a/docs/ru/interfaces/cli.md b/docs/ru/interfaces/cli.md index 277b73a6d36..bbb66b70371 100644 --- a/docs/ru/interfaces/cli.md +++ b/docs/ru/interfaces/cli.md @@ -26,7 +26,7 @@ Connected to ClickHouse server version 20.13.1 revision 54442. Клиент может быть использован в интерактивном и не интерактивном (batch) режиме. Чтобы использовать batch режим, укажите параметр query, или отправьте данные в stdin (проверяется, что stdin - не терминал), или и то, и другое. -Аналогично HTTP интерфейсу, при использовании одновременно параметра query и отправке данных в stdin, запрос составляется из конкатенации параметра query, перевода строки, и данных в stdin. Это удобно для больших INSERT запросов. +Аналогично HTTP интерфейсу, при использовании одновременно параметра query и отправке данных в stdin, запрос составляется из конкатенации параметра query, перевода строки и данных в stdin. Это удобно для больших `INSERT` запросов. Примеры использования клиента для вставки данных: @@ -41,17 +41,17 @@ _EOF $ cat file.csv | clickhouse-client --database=test --query="INSERT INTO test FORMAT CSV"; ``` -В batch режиме в качестве формата данных по умолчанию используется формат TabSeparated. Формат может быть указан в секции FORMAT запроса. +В batch режиме в качестве формата данных по умолчанию используется формат `TabSeparated`. Формат может быть указан в запросе в секции `FORMAT`. -По умолчанию, в batch режиме вы можете выполнить только один запрос. Чтобы выполнить несколько запросов из «скрипта», используйте параметр –multiquery. Это работает для всех запросов кроме INSERT. Результаты запросов выводятся подряд без дополнительных разделителей. -Также, при необходимости выполнить много запросов, вы можете запускать clickhouse-client на каждый запрос. Заметим, что запуск программы clickhouse-client может занимать десятки миллисекунд. +По умолчанию в batch режиме вы можете выполнить только один запрос. Чтобы выполнить несколько запросов из «скрипта», используйте параметр `–-multiquery`. Это работает для всех запросов кроме `INSERT`. Результаты запросов выводятся подряд без дополнительных разделителей. +Если нужно выполнить много запросов, вы можете запускать clickhouse-client отдельно на каждый запрос. Заметим, что запуск программы clickhouse-client может занимать десятки миллисекунд. -В интерактивном режиме, вы получите командную строку, в которую можно вводить запросы. +В интерактивном режиме вы получаете командную строку, в которую можно вводить запросы. Если не указано multiline (по умолчанию): -Чтобы выполнить запрос, нажмите Enter. Точка с запятой на конце запроса не обязательна. Чтобы ввести запрос, состоящий из нескольких строк, перед переводом строки, введите символ обратного слеша: `\` - тогда после нажатия Enter, вам предложат ввести следующую строку запроса. +Чтобы выполнить запрос, нажмите Enter. Точка с запятой на конце запроса необязательна. Чтобы ввести запрос, состоящий из нескольких строк, в конце строки поставьте символ обратного слеша `\`, тогда после нажатия Enter вы сможете ввести следующую строку запроса. -Если указано multiline (многострочный режим): +Если указан параметр `--multiline` (многострочный режим): Чтобы выполнить запрос, завершите его точкой с запятой и нажмите Enter. Если в конце введённой строки не было точки с запятой, то вам предложат ввести следующую строчку запроса. Исполняется только один запрос, поэтому всё, что введено после точки с запятой, игнорируется. @@ -61,20 +61,20 @@ $ cat file.csv | clickhouse-client --database=test --query="INSERT INTO test FOR Командная строка сделана на основе readline (и history) (или libedit, или без какой-либо библиотеки, в зависимости от сборки) - то есть, в ней работают привычные сочетания клавиш, а также присутствует история. История пишется в `~/.clickhouse-client-history`. -По умолчанию, в качестве формата, используется формат PrettyCompact (красивые таблички). Вы можете изменить формат с помощью секции FORMAT запроса, или с помощью указания `\G` на конце запроса, с помощью аргумента командной строки `--format` или `--vertical`, или с помощью конфигурационного файла клиента. +По умолчанию используется формат вывода `PrettyCompact` (он поддерживает красивый вывод таблиц). Вы можете изменить формат вывода результатов запроса следующими способами: с помощью секции `FORMAT` в запросе, указав символ `\G` в конце запроса, используя аргументы командной строки `--format` или `--vertical` или с помощью конфигурационного файла клиента. -Чтобы выйти из клиента, нажмите Ctrl+D, или наберите вместо запроса одно из: «exit», «quit», «logout», «учше», «йгше», «дщпщге», «exit;», «quit;», «logout;», «учшеж», «йгшеж», «дщпщгеж», «q», «й», «q», «Q», «:q», «й», «Й», «Жй» +Чтобы выйти из клиента, нажмите Ctrl+D или наберите вместо запроса одно из: «exit», «quit», «logout», «учше», «йгше», «дщпщге», «exit;», «quit;», «logout;», «учшеж», «йгшеж», «дщпщгеж», «q», «й», «q», «Q», «:q», «й», «Й», «Жй». -При выполнении запроса, клиент показывает: +При выполнении запроса клиент показывает: -1. Прогресс выполнение запроса, который обновляется не чаще, чем 10 раз в секунду (по умолчанию). При быстрых запросах, прогресс может не успеть отобразиться. +1. Прогресс выполнение запроса, который обновляется не чаще, чем 10 раз в секунду (по умолчанию). При быстрых запросах прогресс может не успеть отобразиться. 2. Отформатированный запрос после его парсинга - для отладки. 3. Результат в заданном формате. 4. Количество строк результата, прошедшее время, а также среднюю скорость выполнения запроса. -Вы можете прервать длинный запрос, нажав Ctrl+C. При этом вам всё равно придётся чуть-чуть подождать, пока сервер остановит запрос. На некоторых стадиях выполнения, запрос невозможно прервать. Если вы не дождётесь и нажмёте Ctrl+C второй раз, то клиент будет завершён. +Вы можете прервать длинный запрос, нажав Ctrl+C. При этом вам всё равно придётся чуть-чуть подождать, пока сервер остановит запрос. На некоторых стадиях выполнения запрос невозможно прервать. Если вы не дождётесь и нажмёте Ctrl+C второй раз, то клиент будет завершён. -Клиент командной строки позволяет передать внешние данные (внешние временные таблицы) для использования запроса. Подробнее смотрите раздел «Внешние данные для обработки запроса» +Клиент командной строки позволяет передать внешние данные (внешние временные таблицы) для выполнения запроса. Подробнее смотрите раздел «Внешние данные для обработки запроса». ### Запросы с параметрами {#cli-queries-with-parameters} @@ -84,7 +84,7 @@ $ cat file.csv | clickhouse-client --database=test --query="INSERT INTO test FOR clickhouse-client --param_parName="[1, 2]" -q "SELECT * FROM table WHERE a = {parName:Array(UInt16)}" ``` -#### Cинтаксис запроса {#cli-queries-with-parameters-syntax} +#### Синтаксис запроса {#cli-queries-with-parameters-syntax} Отформатируйте запрос обычным способом. Представьте значения, которые вы хотите передать из параметров приложения в запрос в следующем формате: @@ -155,3 +155,29 @@ $ clickhouse-client --param_tbl="numbers" --param_db="system" --param_col="numbe ``` +### Формат ID запроса {#query-id-format} + +В интерактивном режиме `clickhouse-client` показывает ID для каждого запроса. По умолчанию ID выводится в таком виде: + +```sql +Query id: 927f137d-00f1-4175-8914-0dd066365e96 +``` + +Произвольный формат ID можно задать в конфигурационном файле внутри тега `query_id_formats`. ID подставляется вместо `{query_id}` в строке формата. В теге может быть перечислено несколько строк формата. +Эта возможность может быть полезна для генерации URL, с помощью которых выполняется профилирование запросов. + +**Пример** + +```xml + + + http://speedscope-host/#profileURL=qp%3Fid%3D{query_id} + + +``` + +Если применить приведённую выше конфигурацию, то ID запроса будет выводиться в следующем виде: + +``` text +speedscope:http://speedscope-host/#profileURL=qp%3Fid%3Dc8ecc783-e753-4b38-97f1-42cddfb98b7d +``` diff --git a/docs/ru/interfaces/formats.md b/docs/ru/interfaces/formats.md index 563a137ac17..d0bcb057cf2 100644 --- a/docs/ru/interfaces/formats.md +++ b/docs/ru/interfaces/formats.md @@ -22,20 +22,19 @@ ClickHouse может принимать (`INSERT`) и отдавать (`SELECT | [CustomSeparated](#format-customseparated) | ✔ | ✔ | | [Values](#data-format-values) | ✔ | ✔ | | [Vertical](#vertical) | ✗ | ✔ | -| [VerticalRaw](#verticalraw) | ✗ | ✔ | | [JSON](#json) | ✗ | ✔ | | [JSONAsString](#jsonasstring) | ✔ | ✗ | -| [JSONString](#jsonstring) | ✗ | ✔ | +| [JSONStrings](#jsonstrings) | ✗ | ✔ | | [JSONCompact](#jsoncompact) | ✗ | ✔ | -| [JSONCompactString](#jsoncompactstring) | ✗ | ✔ | +| [JSONCompactStrings](#jsoncompactstrings) | ✗ | ✔ | | [JSONEachRow](#jsoneachrow) | ✔ | ✔ | | [JSONEachRowWithProgress](#jsoneachrowwithprogress) | ✗ | ✔ | -| [JSONStringEachRow](#jsonstringeachrow) | ✔ | ✔ | -| [JSONStringEachRowWithProgress](#jsonstringeachrowwithprogress) | ✗ | ✔ | +| [JSONStringsEachRow](#jsonstringseachrow) | ✔ | ✔ | +| [JSONStringsEachRowWithProgress](#jsonstringseachrowwithprogress) | ✗ | ✔ | | [JSONCompactEachRow](#jsoncompacteachrow) | ✔ | ✔ | | [JSONCompactEachRowWithNamesAndTypes](#jsoncompacteachrowwithnamesandtypes) | ✔ | ✔ | -| [JSONCompactStringEachRow](#jsoncompactstringeachrow) | ✔ | ✔ | -| [JSONCompactStringEachRowWithNamesAndTypes](#jsoncompactstringeachrowwithnamesandtypes) | ✔ | ✔ | +| [JSONCompactStringsEachRow](#jsoncompactstringseachrow) | ✔ | ✔ | +| [JSONCompactStringsEachRowWithNamesAndTypes](#jsoncompactstringseachrowwithnamesandtypes) | ✔ | ✔ | | [TSKV](#tskv) | ✔ | ✔ | | [Pretty](#pretty) | ✗ | ✔ | | [PrettyCompact](#prettycompact) | ✗ | ✔ | @@ -59,6 +58,7 @@ ClickHouse может принимать (`INSERT`) и отдавать (`SELECT | [LineAsString](#lineasstring) | ✔ | ✗ | | [Regexp](#data-format-regexp) | ✔ | ✗ | | [RawBLOB](#rawblob) | ✔ | ✔ | +| [MsgPack](#msgpack) | ✔ | ✔ | Вы можете регулировать некоторые параметры работы с форматами с помощью настроек ClickHouse. За дополнительной информацией обращайтесь к разделу [Настройки](../operations/settings/settings.md). @@ -364,7 +364,7 @@ $ clickhouse-client --format_csv_delimiter="|" --query="INSERT INTO test.csv FOR ## CSVWithNames {#csvwithnames} -Выводит также заголовок, аналогично `TabSeparatedWithNames`. +Выводит также заголовок, аналогично [TabSeparatedWithNames](#tabseparatedwithnames). ## CustomSeparated {#format-customseparated} @@ -442,7 +442,7 @@ ClickHouse поддерживает [NULL](../sql-reference/syntax.md), кото - Формат [JSONEachRow](#jsoneachrow) - Настройка [output_format_json_array_of_rows](../operations/settings/settings.md#output-format-json-array-of-rows) -## JSONString {#jsonstring} +## JSONStrings {#jsonstrings} Отличается от JSON только тем, что поля данных выводятся в строках, а не в типизированных значениях JSON. @@ -519,7 +519,7 @@ SELECT * FROM json_as_string; ``` ## JSONCompact {#jsoncompact} -## JSONCompactString {#jsoncompactstring} +## JSONCompactStrings {#jsoncompactstrings} Отличается от JSON только тем, что строчки данных выводятся в массивах, а не в object-ах. @@ -558,7 +558,7 @@ SELECT * FROM json_as_string; ``` ```json -// JSONCompactString +// JSONCompactStrings { "meta": [ @@ -590,9 +590,9 @@ SELECT * FROM json_as_string; ``` ## JSONEachRow {#jsoneachrow} -## JSONStringEachRow {#jsonstringeachrow} +## JSONStringsEachRow {#jsonstringseachrow} ## JSONCompactEachRow {#jsoncompacteachrow} -## JSONCompactStringEachRow {#jsoncompactstringeachrow} +## JSONCompactStringsEachRow {#jsoncompactstringseachrow} При использовании этих форматов ClickHouse выводит каждую запись как значения JSON (каждое значение отдельной строкой), при этом данные в целом — невалидный JSON. @@ -605,9 +605,9 @@ SELECT * FROM json_as_string; При вставке данных вы должны предоставить отдельное значение JSON для каждой строки. ## JSONEachRowWithProgress {#jsoneachrowwithprogress} -## JSONStringEachRowWithProgress {#jsonstringeachrowwithprogress} +## JSONStringsEachRowWithProgress {#jsonstringseachrowwithprogress} -Отличается от `JSONEachRow`/`JSONStringEachRow` тем, что ClickHouse будет выдавать информацию о ходе выполнения в виде значений JSON. +Отличается от `JSONEachRow`/`JSONStringsEachRow` тем, что ClickHouse будет выдавать информацию о ходе выполнения в виде значений JSON. ```json {"row":{"'hello'":"hello","multiply(42, number)":"0","range(5)":[0,1,2,3,4]}} @@ -617,9 +617,9 @@ SELECT * FROM json_as_string; ``` ## JSONCompactEachRowWithNamesAndTypes {#jsoncompacteachrowwithnamesandtypes} -## JSONCompactStringEachRowWithNamesAndTypes {#jsoncompactstringeachrowwithnamesandtypes} +## JSONCompactStringsEachRowWithNamesAndTypes {#jsoncompactstringseachrowwithnamesandtypes} -Отличается от `JSONCompactEachRow`/`JSONCompactStringEachRow` тем, что имена и типы столбцов записываются как первые две строки. +Отличается от `JSONCompactEachRow`/`JSONCompactStringsEachRow` тем, что имена и типы столбцов записываются как первые две строки. ```json ["'hello'", "multiply(42, number)", "range(5)"] @@ -915,10 +915,6 @@ test: string with 'quotes' and with some special Этот формат подходит только для вывода результата выполнения запроса, но не для парсинга (приёма данных для вставки в таблицу). -## VerticalRaw {#verticalraw} - -Аналогичен [Vertical](#vertical), но с отключенным выходом. Этот формат подходит только для вывода результата выполнения запроса, но не для парсинга (приёма данных для вставки в таблицу). - ## XML {#xml} Формат XML подходит только для вывода данных, не для парсинга. Пример: @@ -1180,7 +1176,7 @@ ClickHouse поддерживает настраиваемую точность Типы данных столбцов в ClickHouse могут отличаться от типов данных соответствующих полей файла в формате Parquet. При вставке данных ClickHouse интерпретирует типы данных в соответствии с таблицей выше, а затем [приводит](../sql-reference/functions/type-conversion-functions/#type_conversion_function-cast) данные к тому типу, который установлен для столбца таблицы. -### Вставка и выборка данных {#vstavka-i-vyborka-dannykh} +### Вставка и выборка данных {#inserting-and-selecting-data} Чтобы вставить в ClickHouse данные из файла в формате Parquet, выполните команду следующего вида: @@ -1188,6 +1184,8 @@ ClickHouse поддерживает настраиваемую точность $ cat {filename} | clickhouse-client --query="INSERT INTO {some_table} FORMAT Parquet" ``` +Чтобы вставить данные в колонки типа [Nested](../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур, нужно включить настройку [input_format_parquet_import_nested](../operations/settings/settings.md#input_format_parquet_import_nested). + Чтобы получить данные из таблицы ClickHouse и сохранить их в файл формата Parquet, используйте команду следующего вида: ``` bash @@ -1246,6 +1244,8 @@ ClickHouse поддерживает настраиваемую точность $ cat filename.arrow | clickhouse-client --query="INSERT INTO some_table FORMAT Arrow" ``` +Чтобы вставить данные в колонки типа [Nested](../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур, нужно включить настройку [input_format_arrow_import_nested](../operations/settings/settings.md#input_format_arrow_import_nested). + ### Вывод данных {#selecting-data-arrow} Чтобы получить данные из таблицы ClickHouse и сохранить их в файл формата Arrow, используйте команду следующего вида: @@ -1294,7 +1294,7 @@ ClickHouse поддерживает настраиваемую точность Типы данных столбцов в таблицах ClickHouse могут отличаться от типов данных для соответствующих полей ORC. При вставке данных ClickHouse интерпретирует типы данных ORC согласно таблице соответствия, а затем [приводит](../sql-reference/functions/type-conversion-functions/#type_conversion_function-cast) данные к типу, установленному для столбца таблицы ClickHouse. -### Вставка данных {#vstavka-dannykh-1} +### Вставка данных {#inserting-data-2} Чтобы вставить в ClickHouse данные из файла в формате ORC, используйте команду следующего вида: @@ -1302,7 +1302,9 @@ ClickHouse поддерживает настраиваемую точность $ cat filename.orc | clickhouse-client --query="INSERT INTO some_table FORMAT ORC" ``` -### Вывод данных {#vyvod-dannykh-1} +Чтобы вставить данные в колонки типа [Nested](../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур, нужно включить настройку [input_format_orc_import_nested](../operations/settings/settings.md#input_format_orc_import_nested). + +### Вывод данных {#selecting-data-2} Чтобы получить данные из таблицы ClickHouse и сохранить их в файл формата ORC, используйте команду следующего вида: @@ -1458,3 +1460,32 @@ $ clickhouse-client --query "SELECT * FROM {some_table} FORMAT RawBLOB" | md5sum ``` text f9725a22f9191e064120d718e26862a9 - ``` + +## MsgPack {#msgpack} + +ClickHouse поддерживает запись и чтение из файлов в формате [MessagePack](https://msgpack.org/). + +### Соответствие типов данных {#data-types-matching-msgpack} + +| Тип данных MsgPack | Тип данных ClickHouse | +|---------------------------------|------------------------------------------------------------------------------------| +| `uint N`, `positive fixint` | [UIntN](../sql-reference/data-types/int-uint.md) | +| `int N` | [IntN](../sql-reference/data-types/int-uint.md) | +| `fixstr`, `str 8`, `str 16`, `str 32` | [String](../sql-reference/data-types/string.md), [FixedString](../sql-reference/data-types/fixedstring.md) | +| `float 32` | [Float32](../sql-reference/data-types/float.md) | +| `float 64` | [Float64](../sql-reference/data-types/float.md) | +| `uint 16` | [Date](../sql-reference/data-types/date.md) | +| `uint 32` | [DateTime](../sql-reference/data-types/datetime.md) | +| `uint 64` | [DateTime64](../sql-reference/data-types/datetime.md) | +| `fixarray`, `array 16`, `array 32`| [Array](../sql-reference/data-types/array.md) | +| `nil` | [Nothing](../sql-reference/data-types/special-data-types/nothing.md) | + +Пример: + +Запись в файл ".msgpk": + +```sql +$ clickhouse-client --query="CREATE TABLE msgpack (array Array(UInt8)) ENGINE = Memory;" +$ clickhouse-client --query="INSERT INTO msgpack VALUES ([0, 1, 2, 3, 42, 253, 254, 255]), ([255, 254, 253, 42, 3, 2, 1, 0])"; +$ clickhouse-client --query="SELECT * FROM msgpack FORMAT MsgPack" > tmp_msgpack.msgpk; +``` diff --git a/docs/ru/interfaces/mysql.md b/docs/ru/interfaces/mysql.md index 925b1113109..34150e0f96e 100644 --- a/docs/ru/interfaces/mysql.md +++ b/docs/ru/interfaces/mysql.md @@ -43,3 +43,9 @@ mysql> - не поддерживаются подготовленные запросы - некоторые типы данных отправляются как строки + +Чтобы прервать долго выполняемый запрос, используйте запрос `KILL QUERY connection_id` (во время выполнения он будет заменен на `KILL QUERY WHERE query_id = connection_id`). Например: + +``` bash +$ mysql --protocol tcp -h mysql_server -P 9004 default -u default --password=123 -e "KILL QUERY 123456;" +``` \ No newline at end of file diff --git a/docs/ru/interfaces/third-party/gui.md b/docs/ru/interfaces/third-party/gui.md index 9cb28a2c9a2..8e987fab554 100644 --- a/docs/ru/interfaces/third-party/gui.md +++ b/docs/ru/interfaces/third-party/gui.md @@ -75,11 +75,13 @@ toc_title: "Визуальные интерфейсы от сторонних р Основные возможности: -- Построение запросов с подсветкой синтаксиса; -- Просмотр таблиц; -- Автодополнение команд; +- Построение запросов с подсветкой синтаксиса. +- Просмотр таблиц. +- Автодополнение команд. - Полнотекстовый поиск. +По умолчанию DBeaver не использует сессии при подключении (в отличие от CLI, например). Если вам нужна поддержка сессий (например, для установки настроек на сессию), измените настройки подключения драйвера и укажите для настройки `session_id` любое произвольное значение (драйвер использует подключение по http). После этого вы можете использовать любую настройку (setting) в окне запроса. + ### clickhouse-cli {#clickhouse-cli} [clickhouse-cli](https://github.com/hatarist/clickhouse-cli) - это альтернативный клиент командной строки для ClickHouse, написанный на Python 3. @@ -187,4 +189,4 @@ SeekTable [бесплатен](https://www.seektable.com/help/cloud-pricing) д [Chadmin](https://github.com/bun4uk/chadmin) — простой графический интерфейс для визуализации запущенных запросов на вашем кластере ClickHouse. Он отображает информацию о запросах и дает возможность их завершать. -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/gui/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/gui/) diff --git a/docs/ru/interfaces/third-party/integrations.md b/docs/ru/interfaces/third-party/integrations.md index 70a4d233277..62557edff53 100644 --- a/docs/ru/interfaces/third-party/integrations.md +++ b/docs/ru/interfaces/third-party/integrations.md @@ -42,7 +42,7 @@ toc_title: "Библиотеки для интеграции от сторонн - [mfedotov/clickhouse](https://forge.puppet.com/mfedotov/clickhouse) - Мониторинг - [Graphite](https://graphiteapp.org) - - [graphouse](https://github.com/yandex/graphouse) + - [graphouse](https://github.com/ClickHouse/graphouse) - [carbon-clickhouse](https://github.com/lomik/carbon-clickhouse) - [graphite-clickhouse](https://github.com/lomik/graphite-clickhouse) - [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer) - оптимизирует партиции таблиц [\*GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md#graphitemergetree) согласно правилам в [конфигурации rollup](../../engines/table-engines/mergetree-family/graphitemergetree.md#rollup-configuration) diff --git a/docs/ru/introduction/info.md b/docs/ru/introduction/info.md deleted file mode 100644 index a5e7efffc7e..00000000000 --- a/docs/ru/introduction/info.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -toc_priority: 100 ---- - -# Информационная поддержка {#informatsionnaia-podderzhka} - -Информационная поддержка ClickHouse осуществляется на всей территории Российской Федерации без ограничений посредством использования телефонной связи и средств электронной почты на русском языке в круглосуточном режиме: - -- Адрес электронной почты: -- Телефон: +7-495-780-6510 - diff --git a/docs/ru/introduction/performance.md b/docs/ru/introduction/performance.md index eec1dcf4d0a..246d88f5886 100644 --- a/docs/ru/introduction/performance.md +++ b/docs/ru/introduction/performance.md @@ -5,9 +5,9 @@ toc_title: "Производительность" # Производительность {#proizvoditelnost} -По результатам внутреннего тестирования в Яндексе, ClickHouse обладает наиболее высокой производительностью (как наиболее высокой пропускной способностью на длинных запросах, так и наиболее низкой задержкой на коротких запросах), при соответствующем сценарии работы, среди доступных для тестирования систем подобного класса. Результаты тестирования можно посмотреть на [отдельной странице](https://clickhouse.tech/benchmark/dbms/). +По результатам внутреннего тестирования в Яндексе, ClickHouse обладает наиболее высокой производительностью (как наиболее высокой пропускной способностью на длинных запросах, так и наиболее низкой задержкой на коротких запросах), при соответствующем сценарии работы, среди доступных для тестирования систем подобного класса. Результаты тестирования можно посмотреть на [отдельной странице](https://clickhouse.com/benchmark/dbms/). -Также это подтверждают многочисленные независимые бенчмарки. Их не сложно найти в Интернете самостоятельно, либо можно воспользоваться [небольшой коллекцией ссылок по теме](https://clickhouse.tech/#independent-benchmarks). +Также это подтверждают многочисленные независимые бенчмарки. Их не сложно найти в Интернете самостоятельно, либо можно воспользоваться [небольшой коллекцией ссылок по теме](https://clickhouse.com/#independent-benchmarks). ## Пропускная способность при обработке одного большого запроса {#propusknaia-sposobnost-pri-obrabotke-odnogo-bolshogo-zaprosa} diff --git a/docs/ru/operations/clickhouse-keeper.md b/docs/ru/operations/clickhouse-keeper.md new file mode 100644 index 00000000000..14d95ebae68 --- /dev/null +++ b/docs/ru/operations/clickhouse-keeper.md @@ -0,0 +1,119 @@ +--- +toc_priority: 66 +toc_title: ClickHouse Keeper +--- + +# [пре-продакшн] ClickHouse Keeper + +Сервер ClickHouse использует сервис координации [ZooKeeper](https://zookeeper.apache.org/) для [репликации](../engines/table-engines/mergetree-family/replication.md) данных и выполнения [распределенных DDL запросов](../sql-reference/distributed-ddl.md). ClickHouse Keeper — это альтернативный сервис координации, совместимый с ZooKeeper. + +!!! warning "Предупреждение" + ClickHouse Keeper находится в стадии пре-продакшн и тестируется в CI ClickHouse и на нескольких внутренних инсталляциях. + +## Детали реализации + +ZooKeeper — один из первых широко известных сервисов координации с открытым исходным кодом. Он реализован на языке программирования Java, имеет достаточно простую и мощную модель данных. Алгоритм координации Zookeeper называется ZAB (ZooKeeper Atomic Broadcast). Он не гарантирует линеаризуемость операций чтения, поскольку каждый узел ZooKeeper обслуживает чтения локально. В отличие от ZooKeeper, ClickHouse Keeper реализован на C++ и использует алгоритм [RAFT](https://raft.github.io/), [реализация](https://github.com/eBay/NuRaft). Этот алгоритм позволяет достичь линеаризуемости чтения и записи, имеет несколько реализаций с открытым исходным кодом на разных языках. + +По умолчанию ClickHouse Keeper предоставляет те же гарантии, что и ZooKeeper (линеаризуемость записей, последовательная согласованность чтений). У него есть совместимый клиент-серверный протокол, поэтому любой стандартный клиент ZooKeeper может использоваться для взаимодействия с ClickHouse Keeper. Снэпшоты и журналы имеют несовместимый с ZooKeeper формат, однако можно конвертировать данные Zookeeper в снэпшот ClickHouse Keeper с помощью `clickhouse-keeper-converter`. Межсерверный протокол ClickHouse Keeper также несовместим с ZooKeeper, поэтому создание смешанного кластера ZooKeeper / ClickHouse Keeper невозможно. + +## Конфигурация + +ClickHouse Keeper может использоваться как равноценная замена ZooKeeper или как внутренняя часть сервера ClickHouse, но в обоих случаях конфигурация представлена файлом `.xml`. Главный тег конфигурации ClickHouse Keeper — это ``. Параметры конфигурации: + +- `tcp_port` — порт для подключения клиента (по умолчанию для ZooKeeper: `2181`). +- `tcp_port_secure` — зашифрованный порт для подключения клиента. +- `server_id` — уникальный идентификатор сервера, каждый участник кластера должен иметь уникальный номер (1, 2, 3 и т. д.). +- `log_storage_path` — путь к журналам координации, лучше хранить их на незанятом устройстве (актуально и для ZooKeeper). +- `snapshot_storage_path` — путь к снэпшотам координации. + +Другие общие параметры наследуются из конфигурации сервера ClickHouse (`listen_host`, `logger`, и т. д.). + +Настройки внутренней координации находятся в `.`: + +- `operation_timeout_ms` — максимальное время ожидания для одной клиентской операции в миллисекундах (по умолчанию: 10000). +- `session_timeout_ms` — максимальное время ожидания для клиентской сессии в миллисекундах (по умолчанию: 30000). +- `dead_session_check_period_ms` — частота, с которой ClickHouse Keeper проверяет мертвые сессии и удаляет их, в миллисекундах (по умолчанию: 500). +- `heart_beat_interval_ms` — частота, с которой узел-лидер ClickHouse Keeper отправляет хартбиты узлам-последователям, в миллисекундах (по умолчанию: 500). +- `election_timeout_lower_bound_ms` — время, после которого последователь может инициировать выборы лидера, если не получил от него сердцебиения (по умолчанию: 1000). +- `election_timeout_upper_bound_ms` — время, после которого последователь должен инициировать выборы лидера, если не получил от него сердцебиения (по умолчанию: 2000). +- `rotate_log_storage_interval` — количество записей в журнале координации для хранения в одном файле (по умолчанию: 100000). +- `reserved_log_items` — минимальное количество записей в журнале координации которые нужно сохранять после снятия снепшота (по умолчанию: 100000). +- `snapshot_distance` — частота, с которой ClickHouse Keeper делает новые снэпшоты (по количеству записей в журналах), в миллисекундах (по умолчанию: 100000). +- `snapshots_to_keep` — количество снэпшотов для сохранения (по умолчанию: 3). +- `stale_log_gap` — время, после которого лидер считает последователя устаревшим и отправляет ему снэпшот вместо журналов (по умолчанию: 10000). +- `fresh_log_gap` — максимальное отставание от лидера в количестве записей журнала после которого последователь считает себя не отстающим (по умолчанию: 200). +- `max_requests_batch_size` — количество запросов на запись, которые будут сгруппированы в один перед отправкой через RAFT (по умолчанию: 100). +- `force_sync` — вызывать `fsync` при каждой записи в журнал координации (по умолчанию: true). +- `quorum_reads` — выполнять запросы чтения аналогично запросам записи через весь консенсус RAFT с негативным эффектом на производительность и размер журналов (по умолчанию: false). +- `raft_logs_level` — уровень логгирования сообщений в текстовый лог (trace, debug и т. д.) (по умолчанию: information). +- `auto_forwarding` — разрешить пересылку запросов на запись от последователей лидеру (по умолчанию: true). +- `shutdown_timeout` — время ожидания завершения внутренних подключений и выключения, в миллисекундах (по умолчанию: 5000). +- `startup_timeout` — время отключения сервера, если он не подключается к другим участникам кворума, в миллисекундах (по умолчанию: 30000). + +Конфигурация кворума находится в `.` и содержит описание серверов. Единственный параметр для всего кворума — `secure`, который включает зашифрованное соединение для связи между участниками кворума. Параметры для каждого ``: + +- `id` — идентификатор сервера в кворуме. +- `hostname` — имя хоста, на котором размещен сервер. +- `port` — порт, на котором серверу доступны соединения для внутренней коммуникации. + + +Примеры конфигурации кворума с тремя узлами можно найти в [интеграционных тестах](https://github.com/ClickHouse/ClickHouse/tree/master/tests/integration) с префиксом `test_keeper_`. Пример конфигурации для сервера №1: + +```xml + + 2181 + 1 + /var/lib/clickhouse/coordination/log + /var/lib/clickhouse/coordination/snapshots + + + 10000 + 30000 + trace + + + + + 1 + zoo1 + 9444 + + + 2 + zoo2 + 9444 + + + 3 + zoo3 + 9444 + + + +``` + +## Как запустить + +ClickHouse Keeper входит в пакет `clickhouse-server`, просто добавьте кофигурацию `` и запустите сервер ClickHouse как обычно. Если вы хотите запустить ClickHouse Keeper автономно, сделайте это аналогичным способом: + +```bash +clickhouse-keeper --config /etc/your_path_to_config/config.xml --daemon +``` + +## [экспериментально] Переход с ZooKeeper + +Плавный переход с ZooKeeper на ClickHouse Keeper невозможен, необходимо остановить кластер ZooKeeper, преобразовать данные и запустить ClickHouse Keeper. Утилита `clickhouse-keeper-converter` конвертирует журналы и снэпшоты ZooKeeper в снэпшот ClickHouse Keeper. Работа утилиты проверена только для версий ZooKeeper выше 3.4. Для миграции необходимо выполнить следующие шаги: + +1. Остановите все узлы ZooKeeper. + +2. Необязательно, но рекомендуется: найдите узел-лидер ZooKeeper, запустите и снова остановите его. Это заставит ZooKeeper создать консистентный снэпшот. + +3. Запустите `clickhouse-keeper-converter` на лидере, например: + +```bash +clickhouse-keeper-converter --zookeeper-logs-dir /var/lib/zookeeper/version-2 --zookeeper-snapshots-dir /var/lib/zookeeper/version-2 --output-dir /path/to/clickhouse/keeper/snapshots +``` + +4. Скопируйте снэпшот на узлы сервера ClickHouse с настроенным `keeper` или запустите ClickHouse Keeper вместо ZooKeeper. Снэпшот должен сохраняться на всех узлах: в противном случае пустые узлы могут захватить лидерство и сконвертированные данные могут быть отброшены на старте. + +[Original article](https://clickhouse.com/docs/en/operations/clickhouse-keeper/) diff --git a/docs/ru/operations/configuration-files.md b/docs/ru/operations/configuration-files.md index 8b4b0da8f2b..343fffdfaa5 100644 --- a/docs/ru/operations/configuration-files.md +++ b/docs/ru/operations/configuration-files.md @@ -6,19 +6,51 @@ toc_title: "Конфигурационные файлы" # Конфигурационные файлы {#configuration_files} -Основной конфигурационный файл сервера - `config.xml` или `config.yaml`. Он расположен в директории `/etc/clickhouse-server/`. +ClickHouse поддерживает многофайловое управление конфигурацией. Основной конфигурационный файл сервера — `/etc/clickhouse-server/config.xml` или `/etc/clickhouse-server/config.yaml`. Остальные файлы должны находиться в директории `/etc/clickhouse-server/config.d`. Обратите внимание, что конфигурационные файлы могут быть записаны в форматах XML или YAML, но смешение этих форматов в одном файле не поддерживается. Например, можно хранить основные конфигурационные файлы как `config.xml` и `users.xml`, а дополнительные файлы записать в директории `config.d` и `users.d` в формате `.yaml`. -Отдельные настройки могут быть переопределены в файлах `*.xml` и `*.conf`, а также `.yaml` (для файлов в формате YAML) из директории `config.d` рядом с конфигом. +Все XML файлы должны иметь одинаковый корневой элемент, обычно ``. Для YAML элемент `yandex:` должен отсутствовать, так как парсер вставляет его автоматически. -У элементов этих конфигурационных файлов могут быть указаны атрибуты `replace` или `remove`. +## Переопределение {#override} -Если ни один не указан - объединить содержимое элементов рекурсивно с заменой значений совпадающих детей. +Некоторые настройки, определенные в основном конфигурационном файле, могут быть переопределены в других файлах: -Если указано `replace` - заменить весь элемент на указанный. +- У элементов этих конфигурационных файлов могут быть указаны атрибуты `replace` или `remove`. +- Если ни один атрибут не указан, сервер объединит содержимое элементов рекурсивно, заменяя совпадающие значения дочерних элементов. +- Если указан атрибут `replace`, сервер заменит весь элемент на указанный. +- Если указан атрибут `remove`, сервер удалит элемент. -Если указано `remove` - удалить элемент. +Также возможно указать атрибуты как переменные среды с помощью `from_env="VARIABLE_NAME"`: -Также в конфиге могут быть указаны «подстановки». Если у элемента присутствует атрибут `incl`, то в качестве значения будет использована соответствующая подстановка из файла. По умолчанию, путь к файлу с подстановками - `/etc/metrika.xml`. Он может быть изменён в конфигурации сервера в элементе [include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from). Значения подстановок указываются в элементах `/yandex/имя_подстановки` этого файла. Если подстановка, заданная в `incl` отсутствует, то в лог попадает соответствующая запись. Чтобы ClickHouse не писал в лог об отсутствии подстановки, необходимо указать атрибут `optional="true"` (например, настройка [macros](server-configuration-parameters/settings.md)). +```xml + + + + + + + +``` + +## Подстановки {#substitution} + +В конфигурационном файле могут быть указаны «подстановки». Если у элемента присутствует атрибут `incl`, то в качестве значения будет использована соответствующая подстановка из файла. По умолчанию путь к файлу с подстановками - `/etc/metrika.xml`. Он может быть изменён в конфигурации сервера в элементе [include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from). Значения подстановок указываются в элементах `/clickhouse/имя_подстановки` этого файла. Если подстановка, заданная в `incl`, отсутствует, то делается соответствующая запись в лог. Чтобы ClickHouse фиксировал в логе отсутствие подстановки, необходимо указать атрибут `optional="true"` (например, настройки для [macros](server-configuration-parameters/settings.md#macros)). + +Если нужно заменить весь элемент подстановкой, можно использовать `include` как имя элемента. + +Пример подстановки XML: + +```xml + + + + + + + + + + +``` Подстановки могут также выполняться из ZooKeeper. Для этого укажите у элемента атрибут `from_zk = "/path/to/node"`. Значение элемента заменится на содержимое узла `/path/to/node` в ZooKeeper. В ZooKeeper-узел также можно положить целое XML-поддерево, оно будет целиком вставлено в исходный элемент. @@ -115,3 +147,9 @@ seq: 123 abc ``` + +## Детали реализации {#implementation-details} + +При старте сервера для каждого конфигурационного файла создаются файлы предобработки `file-preprocessed.xml`. Они содержат все выполненные подстановки и переопределения (эти сведения записываются просто для информации). Если в конфигурационном файле настроены подстановки ZooKeeper, но при старте сервера ZooKeeper не доступен, то сервер загружает конфигурацию из соответствующего файла предобработки. + +Сервер отслеживает как изменения в конфигурационных файлах, так и файлы и узы ZooKeeper, которые были использованы при выполнении подстановок и переопределений, и на ходу перезагружает настройки для пользователей и кластеров. Это означает, что можно изменять кластеры, пользователей и их настройки без перезапуска сервера. diff --git a/docs/ru/operations/external-authenticators/index.md b/docs/ru/operations/external-authenticators/index.md index c2ed9750562..8465e57d792 100644 --- a/docs/ru/operations/external-authenticators/index.md +++ b/docs/ru/operations/external-authenticators/index.md @@ -13,4 +13,4 @@ ClickHouse поддерживает аутентификацию и управл - [LDAP](./ldap.md#external-authenticators-ldap) [аутентификатор](./ldap.md#ldap-external-authenticator) и [каталог](./ldap.md#ldap-external-user-directory) - Kerberos [аутентификатор](./kerberos.md#external-authenticators-kerberos) -[Оригинальная статья](https://clickhouse.tech/docs/ru/operations/external-authenticators/index/) +[Оригинальная статья](https://clickhouse.com/docs/ru/operations/external-authenticators/index/) diff --git a/docs/ru/operations/external-authenticators/ldap.md b/docs/ru/operations/external-authenticators/ldap.md index 8f1328c9aa6..7b4bab0290c 100644 --- a/docs/ru/operations/external-authenticators/ldap.md +++ b/docs/ru/operations/external-authenticators/ldap.md @@ -179,4 +179,4 @@ CREATE USER my_user IDENTIFIED WITH ldap SERVER 'my_ldap_server'; - `attribute` — имя атрибута, значение которого будет возвращаться LDAP поиском. По умолчанию: `cn`. - `prefix` — префикс, который, как предполагается, будет находиться перед началом каждой строки в исходном списке строк, возвращаемых LDAP поиском. Префикс будет удален из исходных строк, а сами они будут рассматриваться как имена локальных ролей. По умолчанию: пустая строка. -[Оригинальная статья](https://clickhouse.tech/docs/en/operations/external-authenticators/ldap) +[Оригинальная статья](https://clickhouse.com/docs/en/operations/external-authenticators/ldap) diff --git a/docs/ru/operations/server-configuration-parameters/settings.md b/docs/ru/operations/server-configuration-parameters/settings.md index 98c5748ba41..b713242401d 100644 --- a/docs/ru/operations/server-configuration-parameters/settings.md +++ b/docs/ru/operations/server-configuration-parameters/settings.md @@ -69,6 +69,85 @@ ClickHouse проверяет условия для `min_part_size` и `min_part ``` +## encryption {#server-settings-encryption} + +Настраивает комманду для получения ключа используемого [кодеками шифрования](../../sql-reference/statements/create/table.md#create-query-encryption-codecs). Ключ (или несколько ключей) должны быть записаны в переменные окружения или установлены в конфигурационном файле . + +Ключи могут быть представлены в шестнадцатеричной или строковой форме. Их длинна должна быть равна 16. + +**Пример** + +Загрузка из файла конфигурации: + +```xml + + + 12345567812345678 + + +``` + +!!! note "Примечание" + Хранение ключей в конфигурационном файле не рекомендовано. Это не безопасно. Вы можете переместить ключи в отдельный файл на секретном диске и сделать symlink к этому конфигурационному файлу в папке `config.d/`. + +Загрузка из файла конфигурации, когда ключ представлен в шестнадцатеричной форме: + +```xml + + + 00112233445566778899aabbccddeeff + + +``` + +Загрузка ключа из переменной окружения: + +```xml + + + + + +``` + +Параметр `current_key_id` устанавливает текущий ключ для шифрования, и все указанные ключи можно использовать для расшифровки. + +Все эти методы могут быть применены для нескольких ключей: + +```xml + + + 00112233445566778899aabbccddeeff + + 1 + + +``` + +Параметр `current_key_id` указывает текущий ключ для шифрования. + +Также пользователь может добавить одноразовое случайное число длинной 12 байт (по умолчанию шифрование и дешифровка будут использовать одноразовое число длинной 12 байт, заполненное нулями): + +```xml + + + 0123456789101 + + +``` + +Одноразовое число также может быть представлено в шестнадцатеричной форме: + +```xml + + + abcdefabcdef + + +``` + +Все вышеперечисленное можно применить также для алгоритма `aes_256_gcm_siv` (но ключ должен быть длинной 32 байта). + ## custom_settings_prefixes {#custom_settings_prefixes} Список префиксов для [пользовательских настроек](../../operations/settings/index.md#custom_settings). Префиксы должны перечисляться через запятую. @@ -345,8 +424,6 @@ ClickHouse проверяет условия для `min_part_size` и `min_part example.yandex.ru ``` - - ## interserver_http_credentials {#server-settings-interserver-http-credentials} Имя пользователя и пароль, использующиеся для аутентификации при [репликации](../../operations/server-configuration-parameters/settings.md) движками Replicated\*. Это имя пользователя и пароль используются только для взаимодействия между репликами кластера и никак не связаны с аутентификацией клиентов ClickHouse. Сервер проверяет совпадение имени и пароля для соединяющихся с ним реплик, а также использует это же имя и пароль для соединения с другими репликами. Соответственно, эти имя и пароль должны быть прописаны одинаковыми для всех реплик кластера. @@ -371,12 +448,12 @@ ClickHouse проверяет условия для `min_part_size` и `min_part ## keep_alive_timeout {#keep-alive-timeout} -Время в секундах, в течение которого ClickHouse ожидает входящих запросов прежде, чем закрыть соединение. +Время в секундах, в течение которого ClickHouse ожидает входящих запросов прежде, чем 10акрыть соединение. **Пример** ``` xml -3 +10 ``` ## listen_host {#server_configuration_parameters-listen_host} @@ -414,7 +491,7 @@ ClickHouse проверяет условия для `min_part_size` и `min_part ``` -Также, существует поддержка записи в syslog. Пример конфига: +Также, существует поддержка записи в syslog. Пример настроек: ``` xml @@ -516,7 +593,7 @@ ClickHouse проверяет условия для `min_part_size` и `min_part - Положительное число с плавающей запятой. - 0 — сервер Clickhouse может использовать всю оперативную память. -Значение по умолчанию: `0`. +Значение по умолчанию: `0.9`. **Использование** @@ -873,6 +950,33 @@ ClickHouse проверяет условия для `min_part_size` и `min_part ``` +## query_views_log {#server_configuration_parameters-query_views_log} + +Настройки логирования информации о зависимых представлениях (materialized, live и т.п.) в запросах принятых с настройкой [log_query_views=1](../../operations/settings/settings.md#settings-log-query-views). + +Запросы сохраняются в таблицу system.query_views_log. Вы можете изменить название этой таблицы в параметре `table` (см. ниже). + +При настройке логирования используются следующие параметры: + +- `database` – имя базы данных. +- `table` – имя таблицы куда будут записываться использованные представления. +- `partition_by` — устанавливает [произвольный ключ партиционирования](../../engines/table-engines/mergetree-family/custom-partitioning-key.md). Нельзя использовать если используется `engine` +- `engine` - устанавливает [настройки MergeTree Engine](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table) для системной таблицы. Нельзя использовать если используется `partition_by`. +- `flush_interval_milliseconds` — период сброса данных из буфера в памяти в таблицу. + +Если таблица не существует, то ClickHouse создаст её. Если структура журнала запросов изменилась при обновлении сервера ClickHouse, то таблица со старой структурой переименовывается, а новая таблица создается автоматически. + +**Example** + +``` xml + + system + query_views_log
+ toYYYYMM(event_date) + 7500 +
+``` + ## text_log {#server_configuration_parameters-text_log} Настройка логирования текстовых сообщений в системную таблицу [text_log](../../operations/system-tables/text_log.md#system_tables-text_log). @@ -882,7 +986,7 @@ ClickHouse проверяет условия для `min_part_size` и `min_part - `level` — Максимальный уровень сообщения (по умолчанию `Trace`) которое будет сохранено в таблице. - `database` — имя базы данных для хранения таблицы. - `table` — имя таблицы, куда будут записываться текстовые сообщения. -- `partition_by` — устанавливает [произвольный ключ партиционирования](../../operations/server-configuration-parameters/settings.md). Нельзя использовать если используется `engine` +- `partition_by` — устанавливает [произвольный ключ партиционирования](../../engines/table-engines/mergetree-family/custom-partitioning-key.md). Нельзя использовать если используется `engine` - `engine` - устанавливает [настройки MergeTree Engine](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table) для системной таблицы. Нельзя использовать если используется `partition_by`. - `flush_interval_milliseconds` — период сброса данных из буфера в памяти в таблицу. @@ -913,7 +1017,7 @@ Parameters: - `engine` - устанавливает [настройки MergeTree Engine](../../engines/table-engines/mergetree-family/mergetree.md#table_engine-mergetree-creating-a-table) для системной таблицы. Нельзя использовать если используется `partition_by`. - `flush_interval_milliseconds` — Interval for flushing data from the buffer in memory to the table. -The default server configuration file `config.xml` contains the following settings section: +По умолчанию файл настроек сервера `config.xml` содержит следующие настройки: ``` xml @@ -1096,7 +1200,7 @@ ClickHouse использует ZooKeeper для хранения метадан - `node` — адрес ноды (сервера) ZooKeeper. Можно сконфигурировать несколько нод. - Например: + Например: @@ -1109,9 +1213,10 @@ ClickHouse использует ZooKeeper для хранения метадан Атрибут `index` задает порядок опроса нод при попытках подключиться к кластеру ZooKeeper. -- `session_timeout` — максимальный таймаут клиентской сессии в миллисекундах. -- `root` — [znode](http://zookeeper.apache.org/doc/r3.5.5/zookeeperOver.html#Nodes+and+ephemeral+nodes), который используется как корневой для всех znode, которые использует сервер ClickHouse. Необязательный. -- `identity` — пользователь и пароль, которые может потребовать ZooKeeper для доступа к запрошенным znode. Необязательный. +- `session_timeout_ms` — максимальный таймаут клиентской сессии в миллисекундах. +- `operation_timeout_ms` — максимальный таймаут для одной операции в миллисекундах. +- `root` — [znode](http://zookeeper.apache.org/doc/r3.5.5/zookeeperOver.html#Nodes+and+ephemeral+nodes), который используется как корневой для всех znode, которые использует сервер ClickHouse. Необязательный. +- `identity` — пользователь и пароль, которые может потребовать ZooKeeper для доступа к запрошенным znode. Необязательный. **Пример конфигурации** @@ -1185,6 +1290,39 @@ ClickHouse использует ZooKeeper для хранения метадан - [background_schedule_pool_size](../settings/settings.md#background_schedule_pool_size) +## distributed_ddl {#server-settings-distributed_ddl} + +Управление запуском [распределенных ddl запросов](../../sql-reference/distributed-ddl.md) (CREATE, DROP, ALTER, RENAME) в кластере. +Работает только если разрешена [работа с ZooKeeper](#server-settings_zookeeper). + +**Пример** + +```xml + + + /clickhouse/task_queue/ddl + + + default + + + 1 + + + + + 604800 + + + 60 + + + 1000 + +``` + ## access_control_path {#access_control_path} Путь к каталогу, где сервер ClickHouse хранит конфигурации пользователей и ролей, созданные командами SQL. @@ -1193,19 +1331,20 @@ ClickHouse использует ZooKeeper для хранения метадан **Смотрите также** -- [Управление доступом](../access-rights.md#access-control) +- [Управление доступом](../../operations/access-rights.md#access-control) ## user_directories {#user_directories} Секция конфигурационного файла,которая содержит настройки: - Путь к конфигурационному файлу с предустановленными пользователями. - Путь к файлу, в котором содержатся пользователи, созданные при помощи SQL команд. +- Путь к узлу ZooKeeper, где хранятся и реплицируются пользователи, созданные с помощью команд SQL (экспериментальная функциональность). Если эта секция определена, путь из [users_config](../../operations/server-configuration-parameters/settings.md#users-config) и [access_control_path](../../operations/server-configuration-parameters/settings.md#access_control_path) не используется. Секция `user_directories` может содержать любое количество элементов, порядок расположения элементов обозначает их приоритет (чем выше элемент, тем выше приоритет). -**Пример** +**Примеры** ``` xml @@ -1218,7 +1357,20 @@ ClickHouse использует ZooKeeper для хранения метадан ``` -Также вы можете указать настройку `memory` — означает хранение информации только в памяти, без записи на диск, и `ldap` — означает хранения информации на [LDAP-сервере](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol). +Пользователи, роли, политики доступа к строкам, квоты и профили могут храниться в ZooKeeper: + +``` xml + + + /etc/clickhouse-server/users.xml + + + /clickhouse/access/ + + +``` + +Также вы можете добавить секции `memory` — означает хранение информации только в памяти, без записи на диск, и `ldap` — означает хранения информации на [LDAP-сервере](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol). Чтобы добавить LDAP-сервер в качестве удаленного каталога пользователей, которые не определены локально, определите один раздел `ldap` со следующими параметрами: - `server` — имя одного из LDAP-серверов, определенных в секции `ldap_servers` конфигурациионного файла. Этот параметр явялется необязательным и может быть пустым. diff --git a/docs/ru/operations/settings/merge-tree-settings.md b/docs/ru/operations/settings/merge-tree-settings.md index 88c511d4d80..08ea9979426 100644 --- a/docs/ru/operations/settings/merge-tree-settings.md +++ b/docs/ru/operations/settings/merge-tree-settings.md @@ -201,6 +201,44 @@ Eсли суммарное число активных кусков во все Значение по умолчанию: `0`. +## max_replicated_fetches_network_bandwidth {#max_replicated_fetches_network_bandwidth} + +Ограничивает максимальную скорость скачивания данных в сети (в байтах в секунду) для синхронизаций между [репликами](../../engines/table-engines/mergetree-family/replication.md). Настройка применяется к конкретной таблице, в отличие от [max_replicated_fetches_network_bandwidth_for_server](settings.md#max_replicated_fetches_network_bandwidth_for_server), которая применяется к серверу. + +Можно ограничить скорость обмена данными как для всего сервера, так и для конкретной таблицы, но для этого значение табличной настройки должно быть меньше серверной. Иначе сервер будет учитывать только настройку `max_replicated_fetches_network_bandwidth_for_server`. + +Настройка соблюдается неточно. + +Возможные значения: + +- Любое целое положительное число. +- 0 — Скорость не ограничена. + +Значение по умолчанию: `0`. + +**Использование** + +Может быть использована для ограничения скорости передачи данных при репликации данных для добавления или замены новых узлов. + +## max_replicated_sends_network_bandwidth {#max_replicated_sends_network_bandwidth} + +Ограничивает максимальную скорость отправки данных по сети (в байтах в секунду) для синхронизации между [репликами](../../engines/table-engines/mergetree-family/replication.md). Настройка применяется к конкретной таблице, в отличие от [max_replicated_sends_network_bandwidth_for_server](settings.md#max_replicated_sends_network_bandwidth_for_server), которая применяется к серверу. + +Можно ограничить скорость обмена данными как для всего сервера, так и для конкретной таблицы, но для этого значение табличной настройки должно быть меньше серверной. Иначе сервер будет учитывать только настройку `max_replicated_sends_network_bandwidth_for_server`. + +Настройка следуется неточно. + +Возможные значения: + +- Любое целое положительное число. +- 0 — Скорость не ограничена. + +Значение по умолчанию: `0`. + +**Использование** + +Может быть использована для ограничения скорости сети при репликации данных для добавления или замены новых узлов. + ## max_bytes_to_merge_at_max_space_in_pool {#max-bytes-to-merge-at-max-space-in-pool} Максимальный суммарный размер кусков (в байтах) в одном слиянии, если есть свободные ресурсы в фоновом пуле. diff --git a/docs/ru/operations/settings/settings.md b/docs/ru/operations/settings/settings.md index 209c2e2001d..dd38b26f8f4 100644 --- a/docs/ru/operations/settings/settings.md +++ b/docs/ru/operations/settings/settings.md @@ -237,6 +237,39 @@ ClickHouse применяет настройку в тех случаях, ко В случае превышения `input_format_allow_errors_ratio` ClickHouse генерирует исключение. +## input_format_parquet_import_nested {#input_format_parquet_import_nested} + +Включает или отключает возможность вставки данных в колонки типа [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур в формате ввода [Parquet](../../interfaces/formats.md#data-format-parquet). + +Возможные значения: + +- 0 — данные не могут быть вставлены в колонки типа `Nested` в виде массива структур. +- 0 — данные могут быть вставлены в колонки типа `Nested` в виде массива структур. + +Значение по умолчанию: `0`. + +## input_format_arrow_import_nested {#input_format_arrow_import_nested} + +Включает или отключает возможность вставки данных в колонки типа [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур в формате ввода [Arrow](../../interfaces/formats.md#data_types-matching-arrow). + +Возможные значения: + +- 0 — данные не могут быть вставлены в колонки типа `Nested` в виде массива структур. +- 0 — данные могут быть вставлены в колонки типа `Nested` в виде массива структур. + +Значение по умолчанию: `0`. + +## input_format_orc_import_nested {#input_format_orc_import_nested} + +Включает или отключает возможность вставки данных в колонки типа [Nested](../../sql-reference/data-types/nested-data-structures/nested.md) в виде массива структур в формате ввода [ORC](../../interfaces/formats.md#data-format-orc). + +Возможные значения: + +- 0 — данные не могут быть вставлены в колонки типа `Nested` в виде массива структур. +- 0 — данные могут быть вставлены в колонки типа `Nested` в виде массива структур. + +Значение по умолчанию: `0`. + ## input_format_values_interpret_expressions {#settings-input_format_values_interpret_expressions} Включает или отключает парсер SQL, если потоковый парсер не может проанализировать данные. Этот параметр используется только для формата [Values](../../interfaces/formats.md#data-format-values) при вставке данных. Дополнительные сведения о парсерах читайте в разделе [Синтаксис](../../sql-reference/syntax.md). @@ -768,12 +801,32 @@ ClickHouse может парсить только базовый формат `Y Кэш несжатых блоков хранит данные, извлечённые при выполнении запросов. ClickHouse использует кэш для ускорения ответов на повторяющиеся небольшие запросы. Настройка защищает кэш от переполнения. Настройка сервера [uncompressed_cache_size](../server-configuration-parameters/settings.md#server-settings-uncompressed_cache_size) определяет размер кэша несжатых блоков. -Возможное значение: +Возможные значения: - Положительное целое число. Значение по умолчанию: 2013265920. +## merge_tree_clear_old_temporary_directories_interval_seconds {#setting-merge-tree-clear-old-temporary-directories-interval-seconds} + +Задает интервал в секундах для удаления старых временных каталогов на сервере ClickHouse. + +Возможные значения: + +- Положительное целое число. + +Значение по умолчанию: `60` секунд. + +## merge_tree_clear_old_parts_interval_seconds {#setting-merge-tree-clear-old-parts-interval-seconds} + +Задает интервал в секундах для удаления старых кусков данных, журналов предзаписи (WAL) и мутаций на сервере ClickHouse . + +Возможные значения: + +- Положительное целое число. + +Значение по умолчанию: `1` секунда. + ## min_bytes_to_use_direct_io {#settings-min-bytes-to-use-direct-io} Минимальный объём данных, необходимый для прямого (небуферизованного) чтения/записи (direct I/O) на диск. @@ -1065,6 +1118,40 @@ SELECT type, query FROM system.query_log WHERE log_comment = 'log_comment test' Значение по умолчанию: `5`. +## max_replicated_fetches_network_bandwidth_for_server {#max_replicated_fetches_network_bandwidth_for_server} + +Ограничивает максимальную скорость обмена данными в сети (в байтах в секунду) для синхронизации между [репликами](../../engines/table-engines/mergetree-family/replication.md). Применяется только при запуске сервера. Можно также ограничить скорость для конкретной таблицы с помощью настройки [max_replicated_fetches_network_bandwidth](../../operations/settings/merge-tree-settings.md#max_replicated_fetches_network_bandwidth). + +Значение настройки соблюдается неточно. + +Возможные значения: + +- Любое целое положительное число. +- 0 — Скорость не ограничена. + +Значение по умолчанию: `0`. + +**Использование** + +Может быть использована для ограничения скорости сети при репликации данных для добавления или замены новых узлов. + +## max_replicated_sends_network_bandwidth_for_server {#max_replicated_sends_network_bandwidth_for_server} + +Ограничивает максимальную скорость обмена данными в сети (в байтах в секунду) для [репликационных](../../engines/table-engines/mergetree-family/replication.md) отправок. Применяется только при запуске сервера. Можно также ограничить скорость для конкретной таблицы с помощью настройки [max_replicated_sends_network_bandwidth](../../operations/settings/merge-tree-settings.md#max_replicated_sends_network_bandwidth). + +Значение настройки соблюдается неточно. + +Возможные значения: + +- Любое целое положительное число. +- 0 — Скорость не ограничена. + +Значение по умолчанию: `0`. + +**Использование** + +Может быть использована для ограничения скорости сети при репликации данных для добавления или замены новых узлов. + ## connect_timeout_with_failover_ms {#connect-timeout-with-failover-ms} Таймаут в миллисекундах на соединение с удалённым сервером, для движка таблиц Distributed, если используются секции shard и replica в описании кластера. @@ -1865,10 +1952,25 @@ ClickHouse генерирует исключение ## input_format_parallel_parsing {#input-format-parallel-parsing} -- Тип: bool -- Значение по умолчанию: True +Включает или отключает режим, при котором входящие данные разбиваются на части, парсинг каждой из которых осуществляется параллельно с сохранением исходного порядка. Поддерживается только для форматов [TSV](../../interfaces/formats.md#tabseparated), [TKSV](../../interfaces/formats.md#tskv), [CSV](../../interfaces/formats.md#csv) и [JSONEachRow](../../interfaces/formats.md#jsoneachrow). -Включает режим, при котором входящие данные парсятся параллельно, но с сохранением исходного порядка следования. Поддерживается только для форматов TSV, TKSV, CSV и JSONEachRow. +Возможные значения: + +- 1 — включен режим параллельного разбора. +- 0 — отключен режим параллельного разбора. + +Значение по умолчанию: `0`. + +## output_format_parallel_formatting {#output-format-parallel-formatting} + +Включает или отключает режим, при котором исходящие данные форматируются параллельно с сохранением исходного порядка. Поддерживается только для форматов [TSV](../../interfaces/formats.md#tabseparated), [TKSV](../../interfaces/formats.md#tskv), [CSV](../../interfaces/formats.md#csv) и [JSONEachRow](../../interfaces/formats.md#jsoneachrow). + +Возможные значения: + +- 1 — включен режим параллельного форматирования. +- 0 — отключен режим параллельного форматирования. + +Значение по умолчанию: `0`. ## min_chunk_bytes_for_parallel_parsing {#min-chunk-bytes-for-parallel-parsing} @@ -3040,7 +3142,7 @@ SELECT * FROM test LIMIT 10 OFFSET 100; Значение по умолчанию: `1800`. -## optimize_fuse_sum_count_avg {#optimize_fuse_sum_count_avg} +## optimize_syntax_fuse_functions {#optimize_syntax_fuse_functions} Позволяет объединить агрегатные функции с одинаковым аргументом. Запрос, содержащий по крайней мере две агрегатные функции: [sum](../../sql-reference/aggregate-functions/reference/sum.md#agg_function-sum), [count](../../sql-reference/aggregate-functions/reference/count.md#agg_function-count) или [avg](../../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg) с одинаковым аргументом, перезаписывается как [sumCount](../../sql-reference/aggregate-functions/reference/sumcount.md#agg_function-sumCount). @@ -3057,7 +3159,7 @@ SELECT * FROM test LIMIT 10 OFFSET 100; ``` sql CREATE TABLE fuse_tbl(a Int8, b Int8) Engine = Log; -SET optimize_fuse_sum_count_avg = 1; +SET optimize_syntax_fuse_functions = 1; EXPLAIN SYNTAX SELECT sum(a), sum(b), count(b), avg(b) from fuse_tbl FORMAT TSV; ``` @@ -3237,3 +3339,169 @@ SETTINGS index_granularity = 8192 │ - 1 — таблица обновляется автоматически в фоновом режиме при обнаружении изменений схемы. Значение по умолчанию: `0`. + +## allow_experimental_projection_optimization {#allow-experimental-projection-optimization} + +Включает или отключает поддержку [проекций](../../engines/table-engines/mergetree-family/mergetree.md#projections) при обработке запросов `SELECT`. + +Возможные значения: + +- 0 — Проекции не поддерживаются. +- 1 — Проекции поддерживаются. + +Значение по умолчанию: `0`. + +## force_optimize_projection {#force-optimize-projection} + +Включает или отключает обязательное использование [проекций](../../engines/table-engines/mergetree-family/mergetree.md#projections) в запросах `SELECT`, если поддержка проекций включена (см. настройку [allow_experimental_projection_optimization](#allow-experimental-projection-optimization)). + +Возможные значения: + +- 0 — Проекции используются опционально. +- 1 — Проекции обязательно используются. + +Значение по умолчанию: `0`. + +## replication_alter_partitions_sync {#replication-alter-partitions-sync} + +Позволяет настроить ожидание выполнения действий на репликах запросами [ALTER](../../sql-reference/statements/alter/index.md), [OPTIMIZE](../../sql-reference/statements/optimize.md) или [TRUNCATE](../../sql-reference/statements/truncate.md). + +Возможные значения: + +- 0 — не ждать. +- 1 — ждать выполнения действий на своей реплике. +- 2 — ждать выполнения действий на всех репликах. + +Значение по умолчанию: `1`. + +## replication_wait_for_inactive_replica_timeout {#replication-wait-for-inactive-replica-timeout} + +Указывает время ожидания (в секундах) выполнения запросов [ALTER](../../sql-reference/statements/alter/index.md), [OPTIMIZE](../../sql-reference/statements/optimize.md) или [TRUNCATE](../../sql-reference/statements/truncate.md) для неактивных реплик. + +Возможные значения: + +- 0 — не ждать. +- Отрицательное целое число — ждать неограниченное время. +- Положительное целое число — установить соответствующее количество секунд ожидания. + +Значение по умолчанию: `120` секунд. + +## regexp_max_matches_per_row {#regexp-max-matches-per-row} + +Задает максимальное количество совпадений для регулярного выражения. Настройка применяется для защиты памяти от перегрузки при использовании "жадных" квантификаторов в регулярном выражении для функции [extractAllGroupsHorizontal](../../sql-reference/functions/string-search-functions.md#extractallgroups-horizontal). + +Возможные значения: + +- Положительное целое число. + +Значение по умолчанию: `1000`. + +## log_queries_probability {#log-queries-probability} + +Позволяет пользователю записывать в системные таблицы [query_log](../../operations/system-tables/query_log.md), [query_thread_log](../../operations/system-tables/query_thread_log.md) и [query_views_log](../../operations/system-tables/query_views_log.md) только часть запросов, выбранных случайным образом, с указанной вероятностью. Это помогает снизить нагрузку при большом объеме запросов в секунду. + +Возможные значения: + +- 0 — запросы не регистрируются в системных таблицах. +- Положительное число с плавающей точкой в диапазоне [0..1]. Например, при значении настройки, равном `0.5`, примерно половина запросов регистрируется в системных таблицах. +- 1 — все запросы регистрируются в системных таблицах. + +Значение по умолчанию: `1`. + +## short_circuit_function_evaluation {#short-circuit-function-evaluation} + +Позволяет вычислять функции [if](../../sql-reference/functions/conditional-functions.md#if), [multiIf](../../sql-reference/functions/conditional-functions.md#multiif), [and](../../sql-reference/functions/logical-functions.md#logical-and-function) и [or](../../sql-reference/functions/logical-functions.md#logical-or-function) по [короткой схеме](https://ru-wikipedia-org.turbopages.org/ru.wikipedia.org/s/wiki/Вычисления_по_короткой_схеме). Это помогает оптимизировать выполнение сложных выражений в этих функциях и предотвратить возможные исключения (например, деление на ноль, когда оно не ожидается). + +Возможные значения: + +- `enable` — по короткой схеме вычисляются функции, которые подходят для этого (могут сгенерировать исключение или требуют сложных вычислений). +- `force_enable` — все функции вычисляются по короткой схеме. +- `disable` — вычисление функций по короткой схеме отключено. + +Значение по умолчанию: `enable`. + +## max_hyperscan_regexp_length {#max-hyperscan-regexp-length} + +Задает максимальную длину каждого регулярного выражения в [hyperscan-функциях](../../sql-reference/functions/string-search-functions.md#multimatchanyhaystack-pattern1-pattern2-patternn) поиска множественных совпадений в строке. + +Возможные значения: + +- Положительное целое число. +- 0 - длина не ограничена. + +Значение по умолчанию: `0`. + +**Пример** + +Запрос: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 3; +``` + +Результат: + +```text +┌─multiMatchAny('abcd', ['ab', 'bcd', 'c', 'd'])─┐ +│ 1 │ +└────────────────────────────────────────────────┘ +``` + +Запрос: + +```sql +SELECT multiMatchAny('abcd', ['ab','bcd','c','d']) SETTINGS max_hyperscan_regexp_length = 2; +``` + +Результат: + +```text +Exception: Regexp length too large. +``` + +**См. также** + +- [max_hyperscan_regexp_total_length](#max-hyperscan-regexp-total-length) + +## max_hyperscan_regexp_total_length {#max-hyperscan-regexp-total-length} + +Задает максимальную общую длину всех регулярных выражений в каждой [hyperscan-функции](../../sql-reference/functions/string-search-functions.md#multimatchanyhaystack-pattern1-pattern2-patternn) поиска множественных совпадений в строке. + +Возможные значения: + +- Положительное целое число. +- 0 - длина не ограничена. + +Значение по умолчанию: `0`. + +**Пример** + +Запрос: + +```sql +SELECT multiMatchAny('abcd', ['a','b','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +Результат: + +```text +┌─multiMatchAny('abcd', ['a', 'b', 'c', 'd'])─┐ +│ 1 │ +└─────────────────────────────────────────────┘ +``` + +Запрос: + +```sql +SELECT multiMatchAny('abcd', ['ab','bc','c','d']) SETTINGS max_hyperscan_regexp_total_length = 5; +``` + +Результат: + +```text +Exception: Total regexp lengths too large. +``` + +**См. также** + +- [max_hyperscan_regexp_length](#max-hyperscan-regexp-length) diff --git a/docs/ru/operations/system-tables/clusters.md b/docs/ru/operations/system-tables/clusters.md index 6bfeb8aa818..832f5090ce5 100644 --- a/docs/ru/operations/system-tables/clusters.md +++ b/docs/ru/operations/system-tables/clusters.md @@ -68,4 +68,4 @@ estimated_recovery_time: 0 - [Настройка distributed_replica_error_cap](../../operations/settings/settings.md#settings-distributed_replica_error_cap) - [Настройка distributed_replica_error_half_life](../../operations/settings/settings.md#settings-distributed_replica_error_half_life) -[Оригинальная статья](https://clickhouse.tech/docs/ru/operations/system_tables/clusters) +[Оригинальная статья](https://clickhouse.com/docs/ru/operations/system_tables/clusters) diff --git a/docs/ru/operations/system-tables/crash-log.md b/docs/ru/operations/system-tables/crash-log.md index d2b3ae5c6f5..7aaac343585 100644 --- a/docs/ru/operations/system-tables/crash-log.md +++ b/docs/ru/operations/system-tables/crash-log.md @@ -45,4 +45,4 @@ build_id: **См. также** - Системная таблица [trace_log](../../operations/system-tables/trace_log.md) -[Original article](https://clickhouse.tech/docs/en/operations/system-tables/crash-log) +[Original article](https://clickhouse.com/docs/en/operations/system-tables/crash-log) diff --git a/docs/ru/operations/system-tables/merge_tree_settings.md b/docs/ru/operations/system-tables/merge_tree_settings.md new file mode 120000 index 00000000000..dbff2462867 --- /dev/null +++ b/docs/ru/operations/system-tables/merge_tree_settings.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/merge_tree_settings.md \ No newline at end of file diff --git a/docs/ru/operations/system-tables/query_log.md b/docs/ru/operations/system-tables/query_log.md index 7e98ddedcec..f7709d6f3da 100644 --- a/docs/ru/operations/system-tables/query_log.md +++ b/docs/ru/operations/system-tables/query_log.md @@ -24,6 +24,8 @@ ClickHouse не удаляет данные из таблица автомати 2. Если во время обработки запроса возникла ошибка, создаются два события с типами `QueryStart` и `ExceptionWhileProcessing`. 3. Если ошибка произошла ещё до запуска запроса, создается одно событие с типом `ExceptionBeforeStart`. +Чтобы уменьшить количество запросов, регистрирующихся в таблице `query_log`, вы можете использовать настройку [log_queries_probability](../../operations/settings/settings.md#log-queries-probability). + Столбцы: - `type` ([Enum8](../../sql-reference/data-types/enum.md)) — тип события, произошедшего при выполнении запроса. Значения: @@ -181,4 +183,4 @@ used_table_functions: [] - [system.query_thread_log](../../operations/system-tables/query_thread_log.md#system_tables-query_thread_log) — в этой таблице содержится информация о цепочке каждого выполненного запроса. -[Оригинальная статья](https://clickhouse.tech/docs/ru/operations/system_tables/query_log) +[Оригинальная статья](https://clickhouse.com/docs/ru/operations/system_tables/query_log) diff --git a/docs/ru/operations/system-tables/query_thread_log.md b/docs/ru/operations/system-tables/query_thread_log.md index 6eade8fc53f..219d468e222 100644 --- a/docs/ru/operations/system-tables/query_thread_log.md +++ b/docs/ru/operations/system-tables/query_thread_log.md @@ -11,6 +11,8 @@ ClickHouse не удаляет данные из таблицы автоматически. Подробности в разделе [Введение](#system-tables-introduction). +Чтобы уменьшить количество запросов, регистрирующихся в таблице `query_thread_log`, вы можете использовать настройку [log_queries_probability](../../operations/settings/settings.md#log-queries-probability). + Столбцы: - `event_date` ([Date](../../sql-reference/data-types/date.md)) — дата завершения выполнения запроса потоком. diff --git a/docs/ru/operations/system-tables/query_views_log.md b/docs/ru/operations/system-tables/query_views_log.md new file mode 120000 index 00000000000..f606e4108ca --- /dev/null +++ b/docs/ru/operations/system-tables/query_views_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/query_views_log.md \ No newline at end of file diff --git a/docs/ru/operations/system-tables/replicas.md b/docs/ru/operations/system-tables/replicas.md index 7879ee707a4..ff58355145d 100644 --- a/docs/ru/operations/system-tables/replicas.md +++ b/docs/ru/operations/system-tables/replicas.md @@ -78,10 +78,11 @@ active_replicas: 2 - `log_max_index` (`UInt64`) - максимальный номер записи в общем логе действий. - `log_pointer` (`UInt64`) - максимальный номер записи из общего лога действий, которую реплика скопировала в свою очередь для выполнения, плюс единица. Если log_pointer сильно меньше log_max_index, значит что-то не так. -- `last_queue_update` (`DateTime`) - When the queue was updated last time. -- `absolute_delay` (`UInt64`) - How big lag in seconds the current replica has. +- `last_queue_update` (`DateTime`) - время последнего обновления запроса. +- `absolute_delay` (`UInt64`) - задержка (в секундах) для текущей реплики. - `total_replicas` (`UInt8`) - общее число известных реплик этой таблицы. - `active_replicas` (`UInt8`) - число реплик этой таблицы, имеющих сессию в ZK; то есть, число работающих реплик. +- `replica_is_active` ([Map(String, UInt8)](../../sql-reference/data-types/map.md)) — соответствие между именем реплики и признаком активности реплики. Если запрашивать все столбцы, то таблица может работать слегка медленно, так как на каждую строчку делается несколько чтений из ZK. Если не запрашивать последние 4 столбца (log_max_index, log_pointer, total_replicas, active_replicas), то таблица работает быстро. diff --git a/docs/ru/operations/system-tables/time_zones.md b/docs/ru/operations/system-tables/time_zones.md new file mode 120000 index 00000000000..d7b0f07d326 --- /dev/null +++ b/docs/ru/operations/system-tables/time_zones.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/time_zones.md \ No newline at end of file diff --git a/docs/ru/operations/utilities/clickhouse-copier.md b/docs/ru/operations/utilities/clickhouse-copier.md index f1bde2be23d..7e1364f9ee1 100644 --- a/docs/ru/operations/utilities/clickhouse-copier.md +++ b/docs/ru/operations/utilities/clickhouse-copier.md @@ -70,7 +70,7 @@ $ clickhouse-copier --daemon --config zookeeper.xml --task-path /task/path --bas false diff --git a/docs/ru/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md b/docs/ru/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md new file mode 120000 index 00000000000..22a84e3e5d2 --- /dev/null +++ b/docs/ru/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/categoricalinformationvalue.md \ No newline at end of file diff --git a/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapand.md b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapand.md new file mode 120000 index 00000000000..861ac2c3dd3 --- /dev/null +++ b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapand.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapand.md \ No newline at end of file diff --git a/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapor.md b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapor.md new file mode 120000 index 00000000000..0fcb851d0a4 --- /dev/null +++ b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapor.md \ No newline at end of file diff --git a/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapxor.md b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapxor.md new file mode 120000 index 00000000000..13c79b37200 --- /dev/null +++ b/docs/ru/sql-reference/aggregate-functions/reference/groupbitmapxor.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/groupbitmapxor.md \ No newline at end of file diff --git a/docs/ru/sql-reference/aggregate-functions/reference/index.md b/docs/ru/sql-reference/aggregate-functions/reference/index.md index b2172e1e70e..c372a0713ca 100644 --- a/docs/ru/sql-reference/aggregate-functions/reference/index.md +++ b/docs/ru/sql-reference/aggregate-functions/reference/index.md @@ -61,6 +61,8 @@ toc_hidden: true - [quantileDeterministic](../../../sql-reference/aggregate-functions/reference/quantiledeterministic.md) - [quantileTDigest](../../../sql-reference/aggregate-functions/reference/quantiletdigest.md) - [quantileTDigestWeighted](../../../sql-reference/aggregate-functions/reference/quantiletdigestweighted.md) +- [quantileBFloat16](../../../sql-reference/aggregate-functions/reference/quantilebfloat16.md#quantilebfloat16) +- [quantileBFloat16Weighted](../../../sql-reference/aggregate-functions/reference/quantilebfloat16.md#quantilebfloat16weighted) - [simpleLinearRegression](../../../sql-reference/aggregate-functions/reference/simplelinearregression.md) - [stochasticLinearRegression](../../../sql-reference/aggregate-functions/reference/stochasticlinearregression.md) - [stochasticLogisticRegression](../../../sql-reference/aggregate-functions/reference/stochasticlogisticregression.md) diff --git a/docs/ru/sql-reference/aggregate-functions/reference/quantilebfloat16.md b/docs/ru/sql-reference/aggregate-functions/reference/quantilebfloat16.md index f8622e3fd05..8f240a3a009 100644 --- a/docs/ru/sql-reference/aggregate-functions/reference/quantilebfloat16.md +++ b/docs/ru/sql-reference/aggregate-functions/reference/quantilebfloat16.md @@ -58,6 +58,10 @@ SELECT quantileBFloat16(0.75)(a), quantileBFloat16(0.75)(b) FROM example_table; ``` Обратите внимание, что все числа с плавающей точкой в примере были округлены до 1.0 при преобразовании к `bfloat16`. +# quantileBFloat16Weighted {#quantilebfloat16weighted} + +Версия функции `quantileBFloat16`, которая учитывает вес каждого элемента последовательности. + **См. также** - [median](../../../sql-reference/aggregate-functions/reference/median.md#median) diff --git a/docs/ru/sql-reference/aggregate-functions/reference/stochasticlinearregression.md b/docs/ru/sql-reference/aggregate-functions/reference/stochasticlinearregression.md index 6da0f6caacd..85524c7ede3 100644 --- a/docs/ru/sql-reference/aggregate-functions/reference/stochasticlinearregression.md +++ b/docs/ru/sql-reference/aggregate-functions/reference/stochasticlinearregression.md @@ -50,7 +50,7 @@ AS state FROM train_data; После сохранения состояния в таблице мы можем использовать его несколько раз для прогнозирования или смёржить с другими состояниями и создать новые, улучшенные модели. -``` sql +```sql WITH (SELECT state FROM your_model) AS model SELECT evalMLMethod(model, param1, param2) FROM test_data ``` @@ -65,9 +65,9 @@ evalMLMethod(model, param1, param2) FROM test_data - ``` sql - SELECT state1 + state2 FROM your_models - ``` +```sql +SELECT state1 + state2 FROM your_models +``` где таблица `your_models` содержит обе модели. Запрос вернёт новый объект `AggregateFunctionState`. @@ -75,9 +75,9 @@ evalMLMethod(model, param1, param2) FROM test_data - ``` sql - SELECT stochasticLinearRegression(0.01)(target, param1, param2) FROM train_data - ``` +```sql +SELECT stochasticLinearRegression(0.01)(target, param1, param2) FROM train_data +``` Подобный запрос строит модель и возвращает её веса, отвечающие параметрам моделей и смещение. Таким образом, в приведенном выше примере запрос вернет столбец с тремя значениями. diff --git a/docs/ru/sql-reference/aggregate-functions/reference/sumcount.md b/docs/ru/sql-reference/aggregate-functions/reference/sumcount.md index 5a8f93209cf..ac721577a9a 100644 --- a/docs/ru/sql-reference/aggregate-functions/reference/sumcount.md +++ b/docs/ru/sql-reference/aggregate-functions/reference/sumcount.md @@ -43,4 +43,4 @@ SELECT sumCount(x) from s_table; **Смотрите также** -- Настройка [optimize_fuse_sum_count_avg](../../../operations/settings/settings.md#optimize_fuse_sum_count_avg) +- Настройка [optimize_syntax_fuse_functions](../../../operations/settings/settings.md#optimize_syntax_fuse_functions) diff --git a/docs/ru/sql-reference/aggregate-functions/reference/uniqthetasketch.md b/docs/ru/sql-reference/aggregate-functions/reference/uniqthetasketch.md new file mode 120000 index 00000000000..ac61a28677f --- /dev/null +++ b/docs/ru/sql-reference/aggregate-functions/reference/uniqthetasketch.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqthetasketch.md \ No newline at end of file diff --git a/docs/ru/sql-reference/data-types/date.md b/docs/ru/sql-reference/data-types/date.md index 50508de96a3..17b4ec99d9a 100644 --- a/docs/ru/sql-reference/data-types/date.md +++ b/docs/ru/sql-reference/data-types/date.md @@ -9,9 +9,9 @@ toc_title: Date Дата хранится без учёта часового пояса. -## Примеры {#examples} +**Пример** -**1.** Создание таблицы и добавление в неё данных: +Создание таблицы и добавление в неё данных: ``` sql CREATE TABLE dt @@ -24,9 +24,6 @@ ENGINE = TinyLog; ``` sql INSERT INTO dt Values (1546300800, 1), ('2019-01-01', 2); -``` - -``` sql SELECT * FROM dt; ``` @@ -37,7 +34,7 @@ SELECT * FROM dt; └────────────┴──────────┘ ``` -## Смотрите также {#see-also} +**См. также** - [Функции для работы с датой и временем](../../sql-reference/functions/date-time-functions.md) - [Операторы для работы с датой и временем](../../sql-reference/operators/index.md#operators-datetime) diff --git a/docs/ru/sql-reference/data-types/date32.md b/docs/ru/sql-reference/data-types/date32.md new file mode 100644 index 00000000000..a335eba8e80 --- /dev/null +++ b/docs/ru/sql-reference/data-types/date32.md @@ -0,0 +1,40 @@ +--- +toc_priority: 48 +toc_title: Date32 +--- + +# Date32 {#data_type-datetime32} + +Дата. Поддерживается такой же диапазон дат, как для типа [Datetime64](../../sql-reference/data-types/datetime64.md). Значение хранится в четырех байтах и соответствует числу дней с 1925-01-01 по 2283-11-11. + +**Пример** + +Создание таблицы со столбцом типа `Date32`и добавление в нее данных: + +``` sql +CREATE TABLE new +( + `timestamp` Date32, + `event_id` UInt8 +) +ENGINE = TinyLog; +``` + +``` sql +INSERT INTO new VALUES (4102444800, 1), ('2100-01-01', 2); +SELECT * FROM new; +``` + +``` text +┌──timestamp─┬─event_id─┐ +│ 2100-01-01 │ 1 │ +│ 2100-01-01 │ 2 │ +└────────────┴──────────┘ +``` + +**См. также** + +- [toDate32](../../sql-reference/functions/type-conversion-functions.md#todate32) +- [toDate32OrZero](../../sql-reference/functions/type-conversion-functions.md#todate32-or-zero) +- [toDate32OrNull](../../sql-reference/functions/type-conversion-functions.md#todate32-or-null) + diff --git a/docs/ru/sql-reference/data-types/datetime64.md b/docs/ru/sql-reference/data-types/datetime64.md index 3a08da75bb7..869543dbbaf 100644 --- a/docs/ru/sql-reference/data-types/datetime64.md +++ b/docs/ru/sql-reference/data-types/datetime64.md @@ -7,7 +7,8 @@ toc_title: DateTime64 Позволяет хранить момент времени, который может быть представлен как календарная дата и время, с заданной суб-секундной точностью. -Размер тика (точность, precision): 10-precision секунд, где precision - целочисленный параметр. +Размер тика (точность, precision): 10-precision секунд, где precision - целочисленный параметр. Возможные значения: [ 0 : 9 ]. +Обычно используются - 3 (миллисекунды), 6 (микросекунды), 9 (наносекунды). **Синтаксис:** @@ -17,7 +18,7 @@ DateTime64(precision, [timezone]) Данные хранятся в виде количества ‘тиков’, прошедших с момента начала эпохи (1970-01-01 00:00:00 UTC), в Int64. Размер тика определяется параметром precision. Дополнительно, тип `DateTime64` позволяет хранить часовой пояс, единый для всей колонки, который влияет на то, как будут отображаться значения типа `DateTime64` в текстовом виде и как будут парситься значения заданные в виде строк (‘2020-01-01 05:00:01.000’). Часовой пояс не хранится в строках таблицы (выборки), а хранится в метаданных колонки. Подробнее см. [DateTime](datetime.md). -Поддерживаются значения от 1 января 1925 г. и до 31 декабря 2283 г. +Поддерживаются значения от 1 января 1925 г. и до 11 ноября 2283 г. ## Примеры {#examples} diff --git a/docs/ru/sql-reference/data-types/domains/ipv4.md b/docs/ru/sql-reference/data-types/domains/ipv4.md index af5f8261fae..2cab40ab38d 100644 --- a/docs/ru/sql-reference/data-types/domains/ipv4.md +++ b/docs/ru/sql-reference/data-types/domains/ipv4.md @@ -31,16 +31,16 @@ CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY from; `IPv4` поддерживает вставку в виде строк с текстовым представлением IPv4 адреса: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.tech', '183.247.232.58')('https://clickhouse.tech/docs/en/', '116.106.34.242'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.com', '183.247.232.58')('https://clickhouse.com/docs/en/', '116.106.34.242'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬───────────from─┐ -│ https://clickhouse.tech/docs/en/ │ 116.106.34.242 │ +│ https://clickhouse.com/docs/en/ │ 116.106.34.242 │ │ https://wikipedia.org │ 116.253.40.133 │ -│ https://clickhouse.tech │ 183.247.232.58 │ +│ https://clickhouse.com │ 183.247.232.58 │ └────────────────────────────────────┴────────────────┘ ``` diff --git a/docs/ru/sql-reference/data-types/domains/ipv6.md b/docs/ru/sql-reference/data-types/domains/ipv6.md index 5b3c17feceb..96e5e817642 100644 --- a/docs/ru/sql-reference/data-types/domains/ipv6.md +++ b/docs/ru/sql-reference/data-types/domains/ipv6.md @@ -31,15 +31,15 @@ CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY from; `IPv6` поддерживает вставку в виде строк с текстовым представлением IPv6 адреса: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.tech', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.tech/docs/en/', '2a02:e980:1e::1'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.com', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.com/docs/en/', '2a02:e980:1e::1'); SELECT * FROM hits; ``` ``` text ┌─url────────────────────────────────┬─from──────────────────────────┐ -│ https://clickhouse.tech │ 2001:44c8:129:2632:33:0:252:2 │ -│ https://clickhouse.tech/docs/en/ │ 2a02:e980:1e::1 │ +│ https://clickhouse.com │ 2001:44c8:129:2632:33:0:252:2 │ +│ https://clickhouse.com/docs/en/ │ 2a02:e980:1e::1 │ │ https://wikipedia.org │ 2a02:aa08:e000:3100::2 │ └────────────────────────────────────┴───────────────────────────────┘ ``` diff --git a/docs/ru/sql-reference/data-types/lowcardinality.md b/docs/ru/sql-reference/data-types/lowcardinality.md index 49ba5db0169..850c31a0b3b 100644 --- a/docs/ru/sql-reference/data-types/lowcardinality.md +++ b/docs/ru/sql-reference/data-types/lowcardinality.md @@ -55,6 +55,5 @@ ORDER BY id ## Смотрите также -- [A Magical Mystery Tour of the LowCardinality Data Type](https://www.altinity.com/blog/2019/3/27/low-cardinality). - [Reducing Clickhouse Storage Cost with the Low Cardinality Type – Lessons from an Instana Engineer](https://www.instana.com/blog/reducing-clickhouse-storage-cost-with-the-low-cardinality-type-lessons-from-an-instana-engineer/). -- [String Optimization (video presentation in Russian)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [Slides in English](https://github.com/yandex/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). +- [String Optimization (video presentation in Russian)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [Slides in English](https://github.com/ClickHouse/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). diff --git a/docs/ru/sql-reference/data-types/map.md b/docs/ru/sql-reference/data-types/map.md index 32eb4a80b3e..8fa742a0d03 100644 --- a/docs/ru/sql-reference/data-types/map.md +++ b/docs/ru/sql-reference/data-types/map.md @@ -94,4 +94,4 @@ SELECT a.values FROM t_map; - функция [map()](../../sql-reference/functions/tuple-map-functions.md#function-map) - функция [CAST()](../../sql-reference/functions/type-conversion-functions.md#type_conversion_function-cast) -[Original article](https://clickhouse.tech/docs/ru/data-types/map/) +[Original article](https://clickhouse.com/docs/ru/data-types/map/) diff --git a/docs/ru/sql-reference/data-types/nested-data-structures/nested.md b/docs/ru/sql-reference/data-types/nested-data-structures/nested.md index 718fe77ae95..db957e57502 100644 --- a/docs/ru/sql-reference/data-types/nested-data-structures/nested.md +++ b/docs/ru/sql-reference/data-types/nested-data-structures/nested.md @@ -1,4 +1,6 @@ -# Nested(Name1 Type1, Name2 Type2, …) {#nestedname1-type1-name2-type2} +# Nested {#nested} + +## Nested(Name1 Type1, Name2 Type2, …) {#nestedname1-type1-name2-type2} Вложенная структура данных - это как будто вложенная таблица. Параметры вложенной структуры данных - имена и типы столбцов, указываются так же, как у запроса CREATE. Каждой строке таблицы может соответствовать произвольное количество строк вложенной структуры данных. @@ -95,4 +97,3 @@ LIMIT 10 При запросе DESCRIBE, столбцы вложенной структуры данных перечисляются так же по отдельности. Работоспособность запроса ALTER для элементов вложенных структур данных, является сильно ограниченной. - diff --git a/docs/ru/sql-reference/data-types/uuid.md b/docs/ru/sql-reference/data-types/uuid.md index b780190f6f4..002573a7455 100644 --- a/docs/ru/sql-reference/data-types/uuid.md +++ b/docs/ru/sql-reference/data-types/uuid.md @@ -75,4 +75,4 @@ SELECT * FROM t_uuid Тип данных UUID не поддерживается арифметическими операциями (например, [abs](../../sql-reference/data-types/uuid.md#arithm_func-abs)) или агрегатными функциями, такими как [sum](../../sql-reference/data-types/uuid.md#agg_function-sum) и [avg](../../sql-reference/data-types/uuid.md#agg_function-avg). -[Original article](https://clickhouse.tech/docs/en/data_types/uuid/) +[Original article](https://clickhouse.com/docs/en/data_types/uuid/) diff --git a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index f1f4a8fae18..06fe4ae327a 100644 --- a/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/ru/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -59,6 +59,7 @@ LAYOUT(LAYOUT_TYPE(param value)) -- layout settings - [direct](#direct) - [range_hashed](#range-hashed) - [complex_key_hashed](#complex-key-hashed) +- [complex_key_range_hashed](#complex-key-range-hashed) - [complex_key_cache](#complex-key-cache) - [complex_key_direct](#complex-key-direct) - [ip_trie](#ip-trie) @@ -268,6 +269,28 @@ PRIMARY KEY Abcdef RANGE(MIN StartTimeStamp MAX EndTimeStamp) ``` +### complex_key_range_hashed {#complex-key-range-hashed} + +Словарь хранится в оперативной памяти в виде хэш-таблицы с упорядоченным массивом диапазонов и соответствующих им значений (см. [range_hashed](#range-hashed)). Данный тип размещения предназначен для использования с составными [ключами](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md). + +Пример конфигурации: + +``` sql +CREATE DICTIONARY range_dictionary +( + CountryID UInt64, + CountryKey String, + StartDate Date, + EndDate Date, + Tax Float64 DEFAULT 0.2 +) +PRIMARY KEY CountryID, CountryKey +SOURCE(CLICKHOUSE(TABLE 'date_table')) +LIFETIME(MIN 1 MAX 1000) +LAYOUT(COMPLEX_KEY_RANGE_HASHED()) +RANGE(MIN StartDate MAX EndDate); +``` + ### cache {#cache} Словарь хранится в кэше, состоящем из фиксированного количества ячеек. Ячейки содержат часто используемые элементы. diff --git a/docs/ru/sql-reference/functions/array-functions.md b/docs/ru/sql-reference/functions/array-functions.md index 6586dd663c7..5507ca77f16 100644 --- a/docs/ru/sql-reference/functions/array-functions.md +++ b/docs/ru/sql-reference/functions/array-functions.md @@ -816,7 +816,7 @@ arrayDifference(array) **Аргументы** -- `array` – [массив](https://clickhouse.tech/docs/ru/data_types/array/). +- `array` – [массив](https://clickhouse.com/docs/ru/data_types/array/). **Возвращаемое значение** @@ -866,7 +866,7 @@ arrayDistinct(array) **Аргументы** -- `array` – [массив](https://clickhouse.tech/docs/ru/data_types/array/). +- `array` – [массив](https://clickhouse.com/docs/ru/data_types/array/). **Возвращаемое значение** diff --git a/docs/ru/sql-reference/functions/bitmap-functions.md b/docs/ru/sql-reference/functions/bitmap-functions.md index 3da729664d0..011d339c847 100644 --- a/docs/ru/sql-reference/functions/bitmap-functions.md +++ b/docs/ru/sql-reference/functions/bitmap-functions.md @@ -66,15 +66,14 @@ bitmapSubsetLimit(bitmap, range_start, cardinality_limit) **Аргументы** - `bitmap` – битмап. [Bitmap object](#bitmap_functions-bitmapbuild). - - `range_start` – начальная точка подмножества. [UInt32](../../sql-reference/functions/bitmap-functions.md#bitmap-functions). -- `cardinality_limit` – Верхний предел подмножества. [UInt32](../../sql-reference/functions/bitmap-functions.md#bitmap-functions). +- `cardinality_limit` – верхний предел подмножества. [UInt32](../../sql-reference/functions/bitmap-functions.md#bitmap-functions). **Возвращаемое значение** Подмножество битмапа. -Тип: `Bitmap object`. +Тип: [Bitmap object](#bitmap_functions-bitmapbuild). **Пример** @@ -92,6 +91,44 @@ SELECT bitmapToArray(bitmapSubsetLimit(bitmapBuild([0,1,2,3,4,5,6,7,8,9,10,11,12 └───────────────────────────┘ ``` +## subBitmap {#subbitmap} + +Возвращает элементы битмапа, начиная с позиции `offset`. Число возвращаемых элементов ограничивается параметром `cardinality_limit`. Аналог строковой функции [substring](string-functions.md#substring)), но для битмапа. + +**Синтаксис** + +``` sql +subBitmap(bitmap, offset, cardinality_limit) +``` + +**Аргументы** + +- `bitmap` – битмап. Тип: [Bitmap object](#bitmap_functions-bitmapbuild). +- `offset` – позиция первого элемента возвращаемого подмножества. Тип: [UInt32](../../sql-reference/data-types/int-uint.md). +- `cardinality_limit` – максимальное число элементов возвращаемого подмножества. Тип: [UInt32](../../sql-reference/data-types/int-uint.md). + +**Возвращаемое значение** + +Подмножество битмапа. + +Тип: [Bitmap object](#bitmap_functions-bitmapbuild). + +**Пример** + +Запрос: + +``` sql +SELECT bitmapToArray(subBitmap(bitmapBuild([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,100,200,500]), toUInt32(10), toUInt32(10))) AS res; +``` + +Результат: + +``` text +┌─res─────────────────────────────┐ +│ [10,11,12,13,14,15,16,17,18,19] │ +└─────────────────────────────────┘ +``` + ## bitmapContains {#bitmap_functions-bitmapcontains} Проверяет вхождение элемента в битовый массив. diff --git a/docs/ru/sql-reference/functions/conditional-functions.md b/docs/ru/sql-reference/functions/conditional-functions.md index 8a78425efd4..521df785df2 100644 --- a/docs/ru/sql-reference/functions/conditional-functions.md +++ b/docs/ru/sql-reference/functions/conditional-functions.md @@ -12,11 +12,13 @@ toc_title: "Условные функции" **Синтаксис** ``` sql -SELECT if(cond, then, else) +if(cond, then, else) ``` Если условие `cond` не равно нулю, то возвращается результат выражения `then`. Если условие `cond` равно нулю или является NULL, то результат выражения `then` пропускается и возвращается результат выражения `else`. +Чтобы вычислять функцию `if` по короткой схеме, используйте настройку [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation). Если настройка включена, то выражение `then` вычисляется только для строк, где условие `cond` верно, а выражение `else` – для строк, где условие `cond` неверно. Например, при выполнении запроса `SELECT if(number = 0, 0, intDiv(42, number)) FROM numbers(10)` не будет сгенерировано исключение из-за деления на ноль, так как `intDiv(42, number)` будет вычислено только для чисел, которые не удовлетворяют условию `number = 0`. + **Аргументы** - `cond` – проверяемое условие. Может быть [UInt8](../../sql-reference/functions/conditional-functions.md) или `NULL`. @@ -77,7 +79,13 @@ SELECT if(0, plus(2, 2), plus(2, 6)); Позволяет более компактно записать оператор [CASE](../operators/index.md#operator_case) в запросе. - multiIf(cond_1, then_1, cond_2, then_2...else) +**Синтаксис** + +``` sql +multiIf(cond_1, then_1, cond_2, then_2, ..., else) +``` + +Чтобы вычислять функцию `multiIf` по короткой схеме, используйте настройку [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation). Если настройка включена, то выражение `then_i` вычисляется только для строк, где условие `((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}) AND cond_i)` верно, `cond_i` вычисляется только для строк, где условие `((NOT cond_1) AND (NOT cond_2) AND ... AND (NOT cond_{i-1}))` верно. Например, при выполнении запроса `SELECT multiIf(number = 2, intDiv(1, number), number = 5) FROM numbers(10)` не будет сгенерировано исключение из-за деления на ноль. **Аргументы** @@ -110,4 +118,3 @@ SELECT if(0, plus(2, 2), plus(2, 6)); │ ᴺᵁᴸᴸ │ └────────────────────────────────────────────┘ ``` - diff --git a/docs/ru/sql-reference/functions/encoding-functions.md b/docs/ru/sql-reference/functions/encoding-functions.md index 161c1304b7c..694dfef7d75 100644 --- a/docs/ru/sql-reference/functions/encoding-functions.md +++ b/docs/ru/sql-reference/functions/encoding-functions.md @@ -17,13 +17,13 @@ char(number_1, [number_2, ..., number_n]); **Аргументы** -- `number_1, number_2, ..., number_n` — числовые аргументы, которые интерпретируются как целые числа. Типы: [Int](../../sql-reference/functions/encoding-functions.md), [Float](../../sql-reference/functions/encoding-functions.md). +- `number_1, number_2, ..., number_n` — числовые аргументы, которые интерпретируются как целые числа. Типы: [Int](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md). **Возвращаемое значение** - Строка из соответствующих байт. -Тип: `String`. +Тип: [String](../../sql-reference/data-types/string.md). **Пример** @@ -73,61 +73,57 @@ SELECT char(0xE4, 0xBD, 0xA0, 0xE5, 0xA5, 0xBD) AS hello; ## hex {#hex} -Returns a string containing the argument’s hexadecimal representation. +Возвращает строку, содержащую шестнадцатеричное представление аргумента. Синоним: `HEX`. -**Syntax** +**Синтаксис** ``` sql hex(arg) ``` -The function is using uppercase letters `A-F` and not using any prefixes (like `0x`) or suffixes (like `h`). +Функция использует прописные буквы `A-F` и не использует никаких префиксов (например, `0x`) или суффиксов (например, `h`). -For integer arguments, it prints hex digits («nibbles») from the most significant to least significant (big endian or «human readable» order). It starts with the most significant non-zero byte (leading zero bytes are omitted) but always prints both digits of every byte even if leading digit is zero. +Для целочисленных аргументов возвращает шестнадцатеричные цифры от наиболее до наименее значимых (`big endian`, человекочитаемый порядок).Он начинается с самого значимого ненулевого байта (начальные нулевые байты опущены), но всегда выводит обе цифры каждого байта, даже если начальная цифра равна нулю. -Example: +Значения типа [Date](../../sql-reference/data-types/date.md) и [DateTime](../../sql-reference/data-types/datetime.md) формируются как соответствующие целые числа (количество дней с момента Unix-эпохи для `Date` и значение Unix Timestamp для `DateTime`). -**Example** +Для [String](../../sql-reference/data-types/string.md) и [FixedString](../../sql-reference/data-types/fixedstring.md), все байты просто кодируются как два шестнадцатеричных числа. Нулевые байты не опущены. -Query: +Значения [Float](../../sql-reference/data-types/float.md) и [Decimal](../../sql-reference/data-types/decimal.md) кодируются как их представление в памяти. Поскольку ClickHouse поддерживает архитектуру `little-endian`, они кодируются от младшего к старшему байту. Нулевые начальные/конечные байты не опущены. + +**Аргументы** + +- `arg` — значение для преобразования в шестнадцатеричное. [String](../../sql-reference/data-types/string.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md) или [DateTime](../../sql-reference/data-types/datetime.md). + +**Возвращаемое значение** + +- Строка — шестнадцатеричное представление аргумента. + +Тип: [String](../../sql-reference/data-types/string.md). + +**Примеры** + +Запрос: ``` sql SELECT hex(1); ``` -Result: +Результат: ``` text 01 ``` -Values of type `Date` and `DateTime` are formatted as corresponding integers (the number of days since Epoch for Date and the value of Unix Timestamp for DateTime). - -For `String` and `FixedString`, all bytes are simply encoded as two hexadecimal numbers. Zero bytes are not omitted. - -Values of floating point and Decimal types are encoded as their representation in memory. As we support little endian architecture, they are encoded in little endian. Zero leading/trailing bytes are not omitted. - -**Parameters** - -- `arg` — A value to convert to hexadecimal. Types: [String](../../sql-reference/functions/encoding-functions.md), [UInt](../../sql-reference/functions/encoding-functions.md), [Float](../../sql-reference/functions/encoding-functions.md), [Decimal](../../sql-reference/functions/encoding-functions.md), [Date](../../sql-reference/functions/encoding-functions.md) or [DateTime](../../sql-reference/functions/encoding-functions.md). - -**Returned value** - -- A string with the hexadecimal representation of the argument. - -Type: `String`. - -**Example** - -Query: +Запрос: ``` sql -SELECT hex(toFloat32(number)) as hex_presentation FROM numbers(15, 2); +SELECT hex(toFloat32(number)) AS hex_presentation FROM numbers(15, 2); ``` -Result: +Результат: ``` text ┌─hex_presentation─┐ @@ -136,13 +132,13 @@ Result: └──────────────────┘ ``` -Query: +Запрос: ``` sql -SELECT hex(toFloat64(number)) as hex_presentation FROM numbers(15, 2); +SELECT hex(toFloat64(number)) AS hex_presentation FROM numbers(15, 2); ``` -Result: +Результат: ``` text ┌─hex_presentation─┐ @@ -208,6 +204,141 @@ SELECT reinterpretAsUInt64(reverse(unhex('FFF'))) AS num; └──────┘ ``` +## bin {#bin} + +Возвращает строку, содержащую бинарное представление аргумента. + +**Синтаксис** + +``` sql +bin(arg) +``` + +Синоним: `BIN`. + +Для целочисленных аргументов возвращаются двоичные числа от наиболее значимого до наименее значимого (`big-endian`, человекочитаемый порядок). Порядок начинается с самого значимого ненулевого байта (начальные нулевые байты опущены), но всегда возвращает восемь цифр каждого байта, если начальная цифра равна нулю. + +Значения типа [Date](../../sql-reference/data-types/date.md) и [DateTime](../../sql-reference/data-types/datetime.md) формируются как соответствующие целые числа (количество дней с момента Unix-эпохи для `Date` и значение Unix Timestamp для `DateTime`). + +Для [String](../../sql-reference/data-types/string.md) и [FixedString](../../sql-reference/data-types/fixedstring.md) все байты кодируются как восемь двоичных чисел. Нулевые байты не опущены. + +Значения [Float](../../sql-reference/data-types/float.md) и [Decimal](../../sql-reference/data-types/decimal.md) кодируются как их представление в памяти. Поскольку ClickHouse поддерживает архитектуру `little-endian`, они кодируются от младшего к старшему байту. Нулевые начальные/конечные байты не опущены. + +**Аргументы** + +- `arg` — значение для преобразования в двоичный код. [String](../../sql-reference/data-types/string.md), [FixedString](../../sql-reference/data-types/fixedstring.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md), [Decimal](../../sql-reference/data-types/decimal.md), [Date](../../sql-reference/data-types/date.md) или [DateTime](../../sql-reference/data-types/datetime.md). + +**Возвращаемое значение** + +- Бинарная строка (BLOB) — двоичное представление аргумента. + +Тип: [String](../../sql-reference/data-types/string.md). + +**Примеры** + +Запрос: + +``` sql +SELECT bin(14); +``` + +Результат: + +``` text +┌─bin(14)──┐ +│ 00001110 │ +└──────────┘ +``` + +Запрос: + +``` sql +SELECT bin(toFloat32(number)) AS bin_presentation FROM numbers(15, 2); +``` + +Результат: + +``` text +┌─bin_presentation─────────────────┐ +│ 00000000000000000111000001000001 │ +│ 00000000000000001000000001000001 │ +└──────────────────────────────────┘ +``` + +Запрос: + +``` sql +SELECT bin(toFloat64(number)) AS bin_presentation FROM numbers(15, 2); +``` + +Результат: + +``` text +┌─bin_presentation─────────────────────────────────────────────────┐ +│ 0000000000000000000000000000000000000000000000000010111001000000 │ +│ 0000000000000000000000000000000000000000000000000011000001000000 │ +└──────────────────────────────────────────────────────────────────┘ +``` + +## unbin {#unbinstr} + +Интерпретирует каждую пару двоичных цифр аргумента как число и преобразует его в байт, представленный числом. Функция выполняет операцию, противоположную [bin](#bin). + +**Синтаксис** + +``` sql +unbin(arg) +``` + +Синоним: `UNBIN`. + +Для числового аргумента `unbin()` не возвращает значение, обратное результату `bin()`. Чтобы преобразовать результат в число, используйте функции [reverse](../../sql-reference/functions/string-functions.md#reverse) и [reinterpretAs](../../sql-reference/functions/type-conversion-functions.md#reinterpretasuint8163264). + +!!! note "Примечание" + Если `unbin` вызывается из клиента `clickhouse-client`, бинарная строка возвращается в кодировке UTF-8. + +Поддерживает двоичные цифры `0` и `1`. Количество двоичных цифр не обязательно должно быть кратно восьми. Если строка аргумента содержит что-либо, кроме двоичных цифр, возвращается некоторый результат, определенный реализацией (ошибки не возникает). + +**Аргументы** + +- `arg` — строка, содержащая любое количество двоичных цифр. [String](../../sql-reference/data-types/string.md). + +**Возвращаемое значение** + +- Бинарная строка (BLOB). + +Тип: [String](../../sql-reference/data-types/string.md). + +**Примеры** + +Запрос: + +``` sql +SELECT UNBIN('001100000011000100110010'), UNBIN('0100110101111001010100110101000101001100'); +``` + +Результат: + +``` text +┌─unbin('001100000011000100110010')─┬─unbin('0100110101111001010100110101000101001100')─┐ +│ 012 │ MySQL │ +└───────────────────────────────────┴───────────────────────────────────────────────────┘ +``` + +Запрос: + +``` sql +SELECT reinterpretAsUInt64(reverse(unbin('1110'))) AS num; +``` + +Результат: + +``` text +┌─num─┐ +│ 14 │ +└─────┘ +``` + ## UUIDStringToNum(str) {#uuidstringtonumstr} Принимает строку, содержащую 36 символов в формате `123e4567-e89b-12d3-a456-426655440000`, и возвращает в виде набора байт в FixedString(16). @@ -263,7 +394,7 @@ SELECT bitPositionsToArray(toInt8(1)) AS bit_positions; Запрос: ``` sql -select bitPositionsToArray(toInt8(-1)) as bit_positions; +SELECT bitPositionsToArray(toInt8(-1)) AS bit_positions; ``` Результат: diff --git a/docs/ru/sql-reference/functions/encryption-functions.md b/docs/ru/sql-reference/functions/encryption-functions.md index d9bcbaf0887..14add7e295c 100644 --- a/docs/ru/sql-reference/functions/encryption-functions.md +++ b/docs/ru/sql-reference/functions/encryption-functions.md @@ -358,4 +358,4 @@ SELECT aes_decrypt_mysql('aes-256-cfb128', unhex('24E9E4966469'), '1234567891012 │ Secret │ └───────────┘ ``` -[Original article](https://clickhouse.tech/docs/ru/sql-reference/functions/encryption_functions/) +[Original article](https://clickhouse.com/docs/ru/sql-reference/functions/encryption_functions/) diff --git a/docs/ru/sql-reference/functions/hash-functions.md b/docs/ru/sql-reference/functions/hash-functions.md index 07c741e0588..c3f9b3f13a4 100644 --- a/docs/ru/sql-reference/functions/hash-functions.md +++ b/docs/ru/sql-reference/functions/hash-functions.md @@ -40,6 +40,10 @@ SELECT halfMD5(array('e','x','a'), 'mple', 10, toDateTime('2019-06-15 23:00:00') └────────────────────┴────────┘ ``` +## MD4 {#hash_functions-md4} + +Вычисляет MD4 от строки и возвращает полученный набор байт в виде FixedString(16). + ## MD5 {#hash_functions-md5} Вычисляет MD5 от строки и возвращает полученный набор байт в виде FixedString(16). @@ -143,7 +147,11 @@ SELECT groupBitXor(cityHash64(*)) FROM table ## SHA256 {#sha256} -Вычисляет SHA-1, SHA-224, SHA-256 от строки и возвращает полученный набор байт в виде FixedString(20), FixedString(28), FixedString(32). +## SHA384 {#sha384} + +## SHA512 {#sha512} + +Вычисляет SHA-1, SHA-224, SHA-256 от строки и возвращает полученный набор байт в виде FixedString(20), FixedString(28), FixedString(32), FixedLength(48) или FixedString(64). Функция работает достаточно медленно (SHA-1 - примерно 5 миллионов коротких строк в секунду на одном процессорном ядре, SHA-224 и SHA-256 - примерно 2.2 миллионов). Рекомендуется использовать эти функции лишь в тех случаях, когда вам нужна конкретная хэш-функция и вы не можете её выбрать. Даже в этих случаях, рекомендуется применять функцию оффлайн - заранее вычисляя значения при вставке в таблицу, вместо того, чтобы применять её при SELECT-ах. diff --git a/docs/ru/sql-reference/functions/index.md b/docs/ru/sql-reference/functions/index.md index 15da9d36ef5..a63c76d8833 100644 --- a/docs/ru/sql-reference/functions/index.md +++ b/docs/ru/sql-reference/functions/index.md @@ -58,6 +58,69 @@ str -> str != Referer Для некоторых функций первый аргумент (лямбда-функция) может отсутствовать. В этом случае подразумевается тождественное отображение. +## Пользовательские функции SQL {#user-defined-functions} + +Функции можно создавать из лямбда выражений с помощью [CREATE FUNCTION](../statements/create/function.md). Для удаления таких функций используется выражение [DROP FUNCTION](../statements/drop.md#drop-function). + +## Исполняемые пользовательские функции {#executable-user-defined-functions} +ClickHouse может вызывать внешнюю программу или скрипт для обработки данных. Такие функции описываются в [конфигурационном файле](../../operations/configuration-files.md). Путь к нему должен быть указан в настройке `user_defined_executable_functions_config` в основной конфигурации. В пути можно использовать символ подстановки `*`, тогда будут загружены все файлы, соответствующие шаблону. Пример: +``` xml +*_function.xml +``` +Файлы с описанием функций ищутся относительно каталога, заданного в настройке `user_files_path`. + +Конфигурация функции содержит следующие настройки: + +- `name` - имя функции. +- `command` - исполняемая команда или скрипт. +- `argument` - описание аргумента, содержащее его тип во вложенной настройке `type`. Каждый аргумент описывается отдельно. +- `format` - [формат](../../interfaces/formats.md) передачи аргументов. +- `return_type` - тип возвращаемого значения. +- `type` - вариант запуска команды. Если задан вариант `executable`, то запускается одна команда. При указании `executable_pool` создается пул команд. +- `max_command_execution_time` - максимальное время в секундах, которое отводится на обработку блока данных. Эта настройка применима только для команд с вариантом запуска `executable_pool`. Необязательная настройка. Значение по умолчанию `10`. +- `command_termination_timeout` - максимальное время завершения команды в секундах после закрытия конвейера. Если команда не завершается, то процессу отправляется сигнал `SIGTERM`. Эта настройка применима только для команд с вариантом запуска `executable_pool`. Необязательная настройка. Значение по умолчанию `10`. +- `pool_size` - размер пула команд. Необязательная настройка. Значение по умолчанию `16`. +- `lifetime` - интервал перезагрузки функций в секундах. Если задан `0`, то функция не перезагружается. +- `send_chunk_header` - управляет отправкой количества строк перед отправкой блока данных для обработки. Необязательная настройка. Значение по умолчанию `false`. + +Команда должна читать аргументы из `STDIN` и выводить результат в `STDOUT`. Обработка должна выполняться в цикле. То есть после обработки группы аргументов команда должна ожидать следующую группу. + +**Пример** + +XML конфигурация, описывающая функцию `test_function`: +``` + + + executable + test_function + UInt64 + + UInt64 + + + UInt64 + + TabSeparated + cd /; clickhouse-local --input-format TabSeparated --output-format TabSeparated --structure 'x UInt64, y UInt64' --query "SELECT x + y FROM table" + 0 + + +``` + +Запрос: + +``` sql +SELECT test_function(toUInt64(2), toUInt64(2)); +``` + +Результат: + +``` text +┌─test_function(toUInt64(2), toUInt64(2))─┐ +│ 4 │ +└─────────────────────────────────────────┘ +``` + ## Обработка ошибок {#obrabotka-oshibok} Некоторые функции могут кидать исключения в случае ошибочных данных. В этом случае, выполнение запроса прерывается, и текст ошибки выводится клиенту. При распределённой обработке запроса, при возникновении исключения на одном из серверов, на другие серверы пытается отправиться просьба тоже прервать выполнение запроса. diff --git a/docs/ru/sql-reference/functions/introspection.md b/docs/ru/sql-reference/functions/introspection.md index cb2bcdb787f..1947bfce42d 100644 --- a/docs/ru/sql-reference/functions/introspection.md +++ b/docs/ru/sql-reference/functions/introspection.md @@ -309,7 +309,7 @@ clone ## tid {#tid} -Возвращает id потока, в котором обрабатывается текущий [Block](https://clickhouse.tech/docs/ru/development/architecture/#block). +Возвращает id потока, в котором обрабатывается текущий [Block](https://clickhouse.com/docs/ru/development/architecture/#block). **Синтаксис** @@ -339,7 +339,7 @@ SELECT tid(); ## logTrace {#logtrace} - Выводит сообщение в лог сервера для каждого [Block](https://clickhouse.tech/docs/ru/development/architecture/#block). + Выводит сообщение в лог сервера для каждого [Block](https://clickhouse.com/docs/ru/development/architecture/#block). **Синтаксис** @@ -371,4 +371,4 @@ SELECT logTrace('logTrace message'); └──────────────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/query_language/functions/introspection/) +[Original article](https://clickhouse.com/docs/en/query_language/functions/introspection/) diff --git a/docs/ru/sql-reference/functions/logical-functions.md b/docs/ru/sql-reference/functions/logical-functions.md index 837541ec58f..6ba55dca30f 100644 --- a/docs/ru/sql-reference/functions/logical-functions.md +++ b/docs/ru/sql-reference/functions/logical-functions.md @@ -19,6 +19,8 @@ toc_title: "Логические функции" and(val1, val2...) ``` +Чтобы вычислять функцию `and` по короткой схеме, используйте настройку [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation). Если настройка включена, то выражение `vali` вычисляется только для строк, где условие `(val1 AND val2 AND ... AND val{i-1})` верно. Например, при выполнении запроса `SELECT and(number = 2, intDiv(1, number)) FROM numbers(10)` не будет сгенерировано исключение из-за деления на ноль. + **Аргументы** - `val1, val2, ...` — список из как минимум двух значений. [Int](../../sql-reference/data-types/int-uint.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md) или [Nullable](../../sql-reference/data-types/nullable.md). @@ -71,6 +73,8 @@ SELECT and(NULL, 1, 10, -2); and(val1, val2...) ``` +Чтобы вычислять функцию `or` по короткой схеме, используйте настройку [short_circuit_function_evaluation](../../operations/settings/settings.md#short-circuit-function-evaluation). Если настройка включена, то выражение `vali` вычисляется только для строк, где условие `((NOT val1) AND (NOT val2) AND ... AND (NOT val{i-1}))` верно. Например, при выполнении запроса `SELECT or(number = 0, intDiv(1, number) != 0) FROM numbers(10)` не будет сгенерировано исключение из-за деления на ноль. + **Аргументы** - `val1, val2, ...` — список из как минимум двух значений. [Int](../../sql-reference/data-types/int-uint.md), [UInt](../../sql-reference/data-types/int-uint.md), [Float](../../sql-reference/data-types/float.md) или [Nullable](../../sql-reference/data-types/nullable.md). diff --git a/docs/ru/sql-reference/functions/other-functions.md b/docs/ru/sql-reference/functions/other-functions.md index c023786b788..d3e0f8b946e 100644 --- a/docs/ru/sql-reference/functions/other-functions.md +++ b/docs/ru/sql-reference/functions/other-functions.md @@ -1148,7 +1148,7 @@ SELECT * FROM table WHERE indexHint() Возвращает диапазон индекса, в котором выполняется заданное условие. -Тип: [Uint8](https://clickhouse.yandex/docs/ru/data_types/int_uint/#diapazony-uint). +Тип: [Uint8](https://clickhouse.com/docs/ru/data_types/int_uint/#diapazony-uint). **Пример** @@ -2185,3 +2185,122 @@ defaultRoles() - Список ролей по умолчанию. Тип: [Array](../../sql-reference/data-types/array.md)([String](../../sql-reference/data-types/string.md)). + +## getServerPort {#getserverport} + +Возвращает номер порта сервера. Если порт не используется сервером, генерируется исключение. + +**Синтаксис** + +``` sql +getServerPort(port_name) +``` + +**Аргументы** + +- `port_name` — имя порта сервера. [String](../../sql-reference/data-types/string.md#string). Возможные значения: + + - 'tcp_port' + - 'tcp_port_secure' + - 'http_port' + - 'https_port' + - 'interserver_http_port' + - 'interserver_https_port' + - 'mysql_port' + - 'postgresql_port' + - 'grpc_port' + - 'prometheus.port' + +**Возвращаемое значение** + +- Номер порта сервера. + +Тип: [UInt16](../../sql-reference/data-types/int-uint.md). + +**Пример** + +Запрос: + +``` sql +SELECT getServerPort('tcp_port'); +``` + +Результат: + +``` text +┌─getServerPort('tcp_port')─┐ +│ 9000 │ +└───────────────────────────┘ +``` + +## queryID {#query-id} + +Возвращает идентификатор текущего запроса. Другие параметры запроса могут быть извлечены из системной таблицы [system.query_log](../../operations/system-tables/query_log.md) через `query_id`. + +В отличие от [initialQueryID](#initial-query-id), функция `queryID` может возвращать различные значения для разных шардов (см. пример). + +**Синтаксис** + +``` sql +queryID() +``` + +**Возвращаемое значение** + +- Идентификатор текущего запроса. + +Тип: [String](../../sql-reference/data-types/string.md) + +**Пример** + +Запрос: + +``` sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT queryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +Результат: + +``` text +┌─count()─┐ +│ 3 │ +└─────────┘ +``` + +## initialQueryID {#initial-query-id} + +Возвращает идентификатор родительского запроса. Другие параметры запроса могут быть извлечены из системной таблицы [system.query_log](../../operations/system-tables/query_log.md) через `initial_query_id`. + +В отличие от [queryID](#query-id), функция `initialQueryID` возвращает одинаковые значения для разных шардов (см. пример). + +**Синтаксис** + +``` sql +initialQueryID() +``` + +**Возвращаемое значение** + +- Идентификатор родительского запроса. + +Тип: [String](../../sql-reference/data-types/string.md) + +**Пример** + +Запрос: + +``` sql +CREATE TABLE tmp (str String) ENGINE = Log; +INSERT INTO tmp (*) VALUES ('a'); +SELECT count(DISTINCT t) FROM (SELECT initialQueryID() AS t FROM remote('127.0.0.{1..3}', currentDatabase(), 'tmp') GROUP BY queryID()); +``` + +Результат: + +``` text +┌─count()─┐ +│ 1 │ +└─────────┘ +``` diff --git a/docs/ru/sql-reference/functions/rounding-functions.md b/docs/ru/sql-reference/functions/rounding-functions.md index 276f85bf6b7..1eede1ea57c 100644 --- a/docs/ru/sql-reference/functions/rounding-functions.md +++ b/docs/ru/sql-reference/functions/rounding-functions.md @@ -27,7 +27,7 @@ N может быть отрицательным. Округляет значение до указанного десятичного разряда. -Функция возвращает ближайшее значение указанного порядка. В случае, когда заданное число равноудалено от чисел необходимого порядка, функция возвращает то из них, которое имеет ближайшую чётную цифру (банковское округление). +Функция возвращает ближайшее значение указанного порядка. В случае, когда заданное число равноудалено от чисел необходимого порядка, для типов с плавающей точкой (Float32/64) функция возвращает то из них, которое имеет ближайшую чётную цифру (банковское округление), для типов с фиксированной точкой (Decimal) функция использует округление в бо́льшую по модулю сторону (математическое округление). ``` sql round(expression [, decimal_places]) @@ -47,7 +47,7 @@ round(expression [, decimal_places]) ### Примеры {#primery} -**Пример использования** +**Пример использования с Float** ``` sql SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3 @@ -61,6 +61,21 @@ SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3 └─────┴──────────────────────────┘ ``` +**Пример использования с Decimal** + + +``` sql +SELECT cast(number / 2 AS Decimal(10,4)) AS x, round(x) FROM system.numbers LIMIT 3 +``` + +``` text +┌──────x─┬─round(CAST(divide(number, 2), 'Decimal(10, 4)'))─┐ +│ 0.0000 │ 0.0000 │ +│ 0.5000 │ 1.0000 │ +│ 1.0000 │ 1.0000 │ +└────────┴──────────────────────────────────────────────────┘ +``` + **Примеры округления** Округление до ближайшего числа. diff --git a/docs/ru/sql-reference/functions/string-search-functions.md b/docs/ru/sql-reference/functions/string-search-functions.md index 5b6cbc68d2e..5bbd760bfb6 100644 --- a/docs/ru/sql-reference/functions/string-search-functions.md +++ b/docs/ru/sql-reference/functions/string-search-functions.md @@ -486,7 +486,7 @@ SELECT extractAllGroupsVertical('abc=111, def=222, ghi=333', '("[^"]+"|\\w+)=("[ ## ilike {#ilike} -Нечувствительный к регистру вариант функции [like](https://clickhouse.tech/docs/ru/sql-reference/functions/string-search-functions/#function-like). Вы можете использовать оператор `ILIKE` вместо функции `ilike`. +Нечувствительный к регистру вариант функции [like](https://clickhouse.com/docs/ru/sql-reference/functions/string-search-functions/#function-like). Вы можете использовать оператор `ILIKE` вместо функции `ilike`. **Синтаксис** @@ -542,7 +542,7 @@ SELECT * FROM Months WHERE ilike(name, '%j%'); **Смотрите также** -- [like](https://clickhouse.tech/docs/ru/sql-reference/functions/string-search-functions/#function-like) +- [like](https://clickhouse.com/docs/ru/sql-reference/functions/string-search-functions/#function-like) ## ngramDistance(haystack, needle) {#ngramdistancehaystack-needle} diff --git a/docs/ru/sql-reference/functions/tuple-map-functions.md b/docs/ru/sql-reference/functions/tuple-map-functions.md index 4775152fb54..e4cc1fefab4 100644 --- a/docs/ru/sql-reference/functions/tuple-map-functions.md +++ b/docs/ru/sql-reference/functions/tuple-map-functions.md @@ -73,22 +73,22 @@ SELECT a['key2'] FROM table_map; **Синтаксис** ``` sql -mapAdd(Tuple(Array, Array), Tuple(Array, Array) [, ...]) +mapAdd(arg1, arg2 [, ...]) ``` **Аргументы** -Аргументами являются [кортежи](../../sql-reference/data-types/tuple.md#tuplet1-t2) из двух [массивов](../../sql-reference/data-types/array.md#data-type-array), где элементы в первом массиве представляют ключи, а второй массив содержит значения для каждого ключа. +Аргументами являются контейнеры [Map](../../sql-reference/data-types/map.md) или [кортежи](../../sql-reference/data-types/tuple.md#tuplet1-t2) из двух [массивов](../../sql-reference/data-types/array.md#data-type-array), где элементы в первом массиве представляют ключи, а второй массив содержит значения для каждого ключа. Все массивы ключей должны иметь один и тот же тип, а все массивы значений должны содержать элементы, которые можно приводить к одному типу ([Int64](../../sql-reference/data-types/int-uint.md#int-ranges), [UInt64](../../sql-reference/data-types/int-uint.md#uint-ranges) или [Float64](../../sql-reference/data-types/float.md#float32-float64)). Общий приведенный тип используется в качестве типа для результирующего массива. **Возвращаемое значение** -- Возвращает один [кортеж](../../sql-reference/data-types/tuple.md#tuplet1-t2), в котором первый массив содержит отсортированные ключи, а второй — значения. +- В зависимости от типа аргументов возвращает один [Map](../../sql-reference/data-types/map.md) или [кортеж](../../sql-reference/data-types/tuple.md#tuplet1-t2), в котором первый массив содержит отсортированные ключи, а второй — значения. **Пример** -Запрос: +Запрос с кортежем: ``` sql SELECT mapAdd(([toUInt8(1), 2], [1, 1]), ([toUInt8(1), 2], [1, 1])) as res, toTypeName(res) as type; @@ -102,6 +102,20 @@ SELECT mapAdd(([toUInt8(1), 2], [1, 1]), ([toUInt8(1), 2], [1, 1])) as res, toTy └───────────────┴────────────────────────────────────┘ ``` +Запрос с контейнером `Map`: + +```sql +SELECT mapAdd(map(1,1), map(1,1)); +``` + +Result: + +```text +┌─mapAdd(map(1, 1), map(1, 1))─┐ +│ {1:2} │ +└──────────────────────────────┘ +``` + ## mapSubtract {#function-mapsubtract} Собирает все ключи и вычитает соответствующие значения. diff --git a/docs/ru/sql-reference/functions/type-conversion-functions.md b/docs/ru/sql-reference/functions/type-conversion-functions.md index 757afca9588..32f24d1e6c5 100644 --- a/docs/ru/sql-reference/functions/type-conversion-functions.md +++ b/docs/ru/sql-reference/functions/type-conversion-functions.md @@ -152,6 +152,104 @@ Cиноним: `DATE`. ## toDateTimeOrNull {#todatetimeornull} +## toDate32 {#todate32} + +Конвертирует аргумент в значение типа [Date32](../../sql-reference/data-types/date32.md). Если значение выходит за границы диапазона, возвращается пограничное значение `Date32`. Если аргумент имеет тип [Date](../../sql-reference/data-types/date.md), учитываются границы типа `Date`. + +**Синтаксис** + +``` sql +toDate32(value) +``` + +**Аргументы** + +- `value` — Значение даты. [String](../../sql-reference/data-types/string.md), [UInt32](../../sql-reference/data-types/int-uint.md) или [Date](../../sql-reference/data-types/date.md). + +**Возвращаемое значение** + +- Календарная дата. + +Тип: [Date32](../../sql-reference/data-types/date32.md). + +**Пример** + +1. Значение находится в границах диапазона: + +``` sql +SELECT toDate32('1955-01-01') AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32('1925-01-01'))─┐ +│ 1955-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +2. Значение выходит за границы диапазона: + +``` sql +SELECT toDate32('1924-01-01') AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32('1925-01-01'))─┐ +│ 1925-01-01 │ Date32 │ +└────────────┴────────────────────────────────────┘ +``` + +3. С аргументом типа `Date`: + +``` sql +SELECT toDate32(toDate('1924-01-01')) AS value, toTypeName(value); +``` + +``` text +┌──────value─┬─toTypeName(toDate32(toDate('1924-01-01')))─┐ +│ 1970-01-01 │ Date32 │ +└────────────┴────────────────────────────────────────────┘ +``` + +## toDate32OrZero {#todate32-or-zero} + +То же самое, что и [toDate32](#todate32), но возвращает минимальное значение типа [Date32](../../sql-reference/data-types/date32.md), если получен недопустимый аргумент. + +**Пример** + +Запрос: + +``` sql +SELECT toDate32OrZero('1924-01-01'), toDate32OrZero(''); +``` + +Результат: + +``` text +┌─toDate32OrZero('1924-01-01')─┬─toDate32OrZero('')─┐ +│ 1925-01-01 │ 1925-01-01 │ +└──────────────────────────────┴────────────────────┘ +``` + +## toDate32OrNull {#todate32-or-null} + +То же самое, что и [toDate32](#todate32), но возвращает `NULL`, если получен недопустимый аргумент. + +**Пример** + +Запрос: + +``` sql +SELECT toDate32OrNull('1955-01-01'), toDate32OrNull(''); +``` + +Результат: + +``` text +┌─toDate32OrNull('1955-01-01')─┬─toDate32OrNull('')─┐ +│ 1955-01-01 │ ᴺᵁᴸᴸ │ +└──────────────────────────────┴────────────────────┘ +``` + ## toDecimal(32\|64\|128\|256) {#todecimal3264128} Преобразует `value` к типу данных [Decimal](../../sql-reference/functions/type-conversion-functions.md) с точностью `S`. `value` может быть числом или строкой. Параметр `S` (scale) задаёт число десятичных знаков. @@ -1338,3 +1436,144 @@ FROM numbers(3); │ 2,"good" │ └───────────────────────────────────────────┘ ``` + +## snowflakeToDateTime {#snowflaketodatetime} + +Извлекает время из [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) в формате [DateTime](../data-types/datetime.md). + +**Синтаксис** + +``` sql +snowflakeToDateTime(value [, time_zone]) +``` + +**Аргументы** + +- `value` — Snowflake ID. [Int64](../data-types/int-uint.md). +- `time_zone` — [временная зона сервера](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-timezone). Функция распознает `time_string` в соответствии с часовым поясом. Необязательный. [String](../../sql-reference/data-types/string.md). + +**Возвращаемое значение** + +- Значение, преобразованное в фомат [DateTime](../data-types/datetime.md). + +**Пример** + +Запрос: + +``` sql +SELECT snowflakeToDateTime(CAST('1426860702823350272', 'Int64'), 'UTC'); +``` + +Результат: + +``` text + +┌─snowflakeToDateTime(CAST('1426860702823350272', 'Int64'), 'UTC')─┐ +│ 2021-08-15 10:57:56 │ +└──────────────────────────────────────────────────────────────────┘ +``` + +## snowflakeToDateTime64 {#snowflaketodatetime64} + +Извлекает время из [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) в формате [DateTime64](../data-types/datetime64.md). + +**Синтаксис** + +``` sql +snowflakeToDateTime64(value [, time_zone]) +``` + +**Аргументы** + +- `value` — Snowflake ID. [Int64](../data-types/int-uint.md). +- `time_zone` — [временная зона сервера](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-timezone). Функция распознает `time_string` в соответствии с часовым поясом. Необязательный. [String](../../sql-reference/data-types/string.md). + +**Возвращаемое значение** + +- Значение, преобразованное в фомат [DateTime64](../data-types/datetime64.md). + +**Пример** + +Запрос: + +``` sql +SELECT snowflakeToDateTime64(CAST('1426860802823350272', 'Int64'), 'UTC'); +``` + +Результат: + +``` text + +┌─snowflakeToDateTime64(CAST('1426860802823350272', 'Int64'), 'UTC')─┐ +│ 2021-08-15 10:58:19.841 │ +└────────────────────────────────────────────────────────────────────┘ +``` + +## dateTimeToSnowflake {#datetimetosnowflake} + +Преобразует значение [DateTime](../data-types/datetime.md) в первый идентификатор [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) на текущий момент. + +**Syntax** + +``` sql +dateTimeToSnowflake(value) +``` + +**Аргументы** + +- `value` — дата и время. [DateTime](../../sql-reference/data-types/datetime.md). + +**Возвращаемое значение** + +- Значение, преобразованное в [Int64](../data-types/int-uint.md), как первый идентификатор Snowflake ID в момент выполнения. + +**Пример** + +Запрос: + +``` sql +WITH toDateTime('2021-08-15 18:57:56', 'Asia/Shanghai') AS dt SELECT dateTimeToSnowflake(dt); +``` + +Результат: + +``` text +┌─dateTimeToSnowflake(dt)─┐ +│ 1426860702823350272 │ +└─────────────────────────┘ +``` + +## dateTime64ToSnowflake {#datetime64tosnowflake} + +Преобразует значение [DateTime64](../data-types/datetime64.md) в первый идентификатор [Snowflake ID](https://en.wikipedia.org/wiki/Snowflake_ID) на текущий момент. + +**Синтаксис** + +``` sql +dateTime64ToSnowflake(value) +``` + +**Аргументы** + +- `value` — дата и время. [DateTime64](../data-types/datetime64.md). + +**Возвращаемое значение** + +- Значение, преобразованное в [Int64](../data-types/int-uint.md), как первый идентификатор Snowflake ID в момент выполнения. + + +**Пример** + +Запрос: + +``` sql +WITH toDateTime64('2021-08-15 18:57:56.492', 3, 'Asia/Shanghai') AS dt64 SELECT dateTime64ToSnowflake(dt64); +``` + +Результат: + +``` text +┌─dateTime64ToSnowflake(dt64)─┐ +│ 1426860704886947840 │ +└─────────────────────────────┘ +``` diff --git a/docs/ru/sql-reference/functions/uuid-functions.md b/docs/ru/sql-reference/functions/uuid-functions.md index 0d534a2d7ce..9374c74cad1 100644 --- a/docs/ru/sql-reference/functions/uuid-functions.md +++ b/docs/ru/sql-reference/functions/uuid-functions.md @@ -243,9 +243,23 @@ SELECT └──────────────────┴──────────────────────────────────────┘ ``` +## serverUUID() {#server-uuid} + +Возвращает случайный и уникальный UUID, который генерируется при первом запуске сервера и сохраняется навсегда. Результат записывается в файл `uuid`, расположенный в каталоге сервера ClickHouse `/var/lib/clickhouse/`. + +**Синтаксис** + +```sql +serverUUID() +``` + +**Возвращаемое значение** + +- UUID сервера. + +Тип: [UUID](../data-types/uuid.md). + ## См. также: {#sm-takzhe} - [dictGetUUID](ext-dict-functions.md) - [dictGetUUIDOrDefault](ext-dict-functions.md) - -[Original article](https://clickhouse.tech/docs/en/query_language/functions/uuid_function/) diff --git a/docs/ru/sql-reference/statements/alter/index.md b/docs/ru/sql-reference/statements/alter/index.md index 043ac3839d9..73ee201b56b 100644 --- a/docs/ru/sql-reference/statements/alter/index.md +++ b/docs/ru/sql-reference/statements/alter/index.md @@ -14,7 +14,7 @@ ALTER TABLE [db].name [ON CLUSTER cluster] ADD|DROP|CLEAR|COMMENT|MODIFY COLUMN В запросе указывается список из одного или более действий через запятую. Каждое действие — операция над столбцом. -Большинство запросов `ALTER` изменяют настройки таблицы или данные: +Большинство запросов `ALTER TABLE` изменяют настройки таблицы или данные: - [COLUMN](../../../sql-reference/statements/alter/column.md) - [PARTITION](../../../sql-reference/statements/alter/partition.md) @@ -26,7 +26,12 @@ ALTER TABLE [db].name [ON CLUSTER cluster] ADD|DROP|CLEAR|COMMENT|MODIFY COLUMN - [TTL](../../../sql-reference/statements/alter/ttl.md) !!! note "Note" - Запрос `ALTER` поддерживается только для таблиц типа `*MergeTree`, а также `Merge` и `Distributed`. Запрос имеет несколько вариантов. + Запрос `ALTER TABLE` поддерживается только для таблиц типа `*MergeTree`, а также `Merge` и `Distributed`. Запрос имеет несколько вариантов. + +Следующие запросы `ALTER` управляют представлениями: + +- [ALTER TABLE ... MODIFY QUERY](../../../sql-reference/statements/alter/view.md) — изменяет структуру [Materialized view](../create/view.md#materialized). +- [ALTER LIVE VIEW](../../../sql-reference/statements/alter/view.md#alter-live-view) — обновляет [Live view](../create/view.md#live-view). Следующие запросы `ALTER` изменяют сущности, связанные с управлением доступом на основе ролей: @@ -64,8 +69,11 @@ ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name Для нереплицируемых таблиц, все запросы `ALTER` выполняются синхронно. Для реплицируемых таблиц, запрос всего лишь добавляет инструкцию по соответствующим действиям в `ZooKeeper`, а сами действия осуществляются при первой возможности. Но при этом, запрос может ждать завершения выполнения этих действий на всех репликах. -Для запросов `ALTER ... ATTACH|DETACH|DROP` можно настроить ожидание, с помощью настройки `replication_alter_partitions_sync`. -Возможные значения: `0` - не ждать, `1` - ждать выполнения только у себя (по умолчанию), `2` - ждать всех. +Для всех запросов `ALTER` можно настроить ожидание с помощью настройки [replication_alter_partitions_sync](../../../operations/settings/settings.md#replication-alter-partitions-sync). + +Вы можете указать время ожидания (в секундах) выполнения всех запросов `ALTER` для неактивных реплик с помощью настройки [replication_wait_for_inactive_replica_timeout](../../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout). + +!!! info "Примечание" + Для всех запросов `ALTER` при `replication_alter_partitions_sync = 2` и неактивности некоторых реплик больше времени, заданного настройкой `replication_wait_for_inactive_replica_timeout`, генерируется исключение `UNFINISHED`. Для запросов `ALTER TABLE ... UPDATE|DELETE` синхронность выполнения определяется настройкой [mutations_sync](../../../operations/settings/settings.md#mutations_sync). - diff --git a/docs/ru/sql-reference/statements/alter/index/index.md b/docs/ru/sql-reference/statements/alter/index/index.md index 1f6bbea5c4b..c3d1e75a77d 100644 --- a/docs/ru/sql-reference/statements/alter/index/index.md +++ b/docs/ru/sql-reference/statements/alter/index/index.md @@ -19,7 +19,7 @@ ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name Команда `ADD INDEX` добавляет описание индексов в метаданные, а `DROP INDEX` удаляет индекс из метаданных и стирает файлы индекса с диска, поэтому они легковесные и работают мгновенно. Если индекс появился в метаданных, то он начнет считаться в последующих слияниях и записях в таблицу, а не сразу после выполнения операции `ALTER`. -`MATERIALIZE INDEX` - перестраивает индекс в указанной партиции. Реализовано как мутация. +`MATERIALIZE INDEX` - перестраивает индекс в указанной партиции. Реализовано как мутация. В случае если нужно перестроить индекс над всеми данными то писать `IN PARTITION` не нужно. Запрос на изменение индексов реплицируется, сохраняя новые метаданные в ZooKeeper и применяя изменения на всех репликах. diff --git a/docs/ru/sql-reference/statements/alter/projection.md b/docs/ru/sql-reference/statements/alter/projection.md index db116963aa6..4b0d7f7865b 100644 --- a/docs/ru/sql-reference/statements/alter/projection.md +++ b/docs/ru/sql-reference/statements/alter/projection.md @@ -5,7 +5,7 @@ toc_title: PROJECTION # Манипуляции с проекциями {#manipulations-with-projections} -Доступны следующие операции: +Доступны следующие операции с [проекциями](../../../engines/table-engines/mergetree-family/mergetree.md#projections): - `ALTER TABLE [db].name ADD PROJECTION name AS SELECT [GROUP BY] [ORDER BY]` — добавляет описание проекции в метаданные. @@ -15,7 +15,7 @@ toc_title: PROJECTION - `ALTER TABLE [db.]table CLEAR PROJECTION name IN PARTITION partition_name` — удаляет файлы проекции с диска без удаления описания. -Комманды ADD, DROP и CLEAR — легковесны, поскольку они только меняют метаданные или удаляют файлы. +Команды `ADD`, `DROP` и `CLEAR` — легковесны, поскольку они только меняют метаданные или удаляют файлы. Также команды реплицируются, синхронизируя описания проекций в метаданных с помощью ZooKeeper. diff --git a/docs/ru/sql-reference/statements/alter/view.md b/docs/ru/sql-reference/statements/alter/view.md new file mode 100644 index 00000000000..86dd018a947 --- /dev/null +++ b/docs/ru/sql-reference/statements/alter/view.md @@ -0,0 +1,44 @@ +--- +toc_priority: 50 +toc_title: VIEW +--- + +# Выражение ALTER TABLE … MODIFY QUERY {#alter-modify-query} + +Вы можеие изменить запрос `SELECT`, который был задан при создании [материализованного представления](../create/view.md#materialized), с помощью запроса 'ALTER TABLE … MODIFY QUERY'. Используйте его если при создании материализованного представления не использовалась секция `TO [db.]name`. Настройка `allow_experimental_alter_materialized_view_structure` должна быть включена. + +Если при создании материализованного представления использовалась конструкция `TO [db.]name`, то для изменения отсоедините представление с помощью [DETACH](../detach.md), измените таблицу с помощью [ALTER TABLE](index.md), а затем снова присоедините запрос с помощью [ATTACH](../attach.md). + +**Пример** + +```sql +CREATE TABLE src_table (`a` UInt32) ENGINE = MergeTree ORDER BY a; +CREATE MATERIALIZED VIEW mv (`a` UInt32) ENGINE = MergeTree ORDER BY a AS SELECT a FROM src_table; +INSERT INTO src_table (a) VALUES (1), (2); +SELECT * FROM mv; +``` +```text +┌─a─┐ +│ 1 │ +│ 2 │ +└───┘ +``` +```sql +ALTER TABLE mv MODIFY QUERY SELECT a * 2 as a FROM src_table; +INSERT INTO src_table (a) VALUES (3), (4); +SELECT * FROM mv; +``` +```text +┌─a─┐ +│ 6 │ +│ 8 │ +└───┘ +┌─a─┐ +│ 1 │ +│ 2 │ +└───┘ +``` + +## Выражение ALTER LIVE VIEW {#alter-live-view} + +Выражение `ALTER LIVE VIEW ... REFRESH` обновляет [Live-представление](../create/view.md#live-view). См. раздел [Force Live View Refresh](../create/view.md#live-view-alter-refresh). diff --git a/docs/ru/sql-reference/statements/create/function.md b/docs/ru/sql-reference/statements/create/function.md new file mode 100644 index 00000000000..90838b25744 --- /dev/null +++ b/docs/ru/sql-reference/statements/create/function.md @@ -0,0 +1,59 @@ +--- +toc_priority: 38 +toc_title: FUNCTION +--- + +# CREATE FUNCTION {#create-function} + +Создает пользовательскую функцию из лямбда-выражения. Выражение должно состоять из параметров функции, констант, операторов и вызовов других функций. + +**Синтаксис** + +```sql +CREATE FUNCTION name AS (parameter0, ...) -> expression +``` +У функции может быть произвольное число параметров. + +Существует несколько ограничений на создаваемые функции: + +- Имя функции должно быть уникальным среди всех пользовательских и системных функций. +- Рекурсивные функции запрещены. +- Все переменные, используемые функцией, должны быть перечислены в списке ее параметров. + +Если какое-нибудь ограничение нарушается, то при попытке создать функцию возникает исключение. + +**Пример** + +Запрос: + +```sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +SELECT number, linear_equation(number, 2, 1) FROM numbers(3); +``` + +Результат: + +``` text +┌─number─┬─plus(multiply(2, number), 1)─┐ +│ 0 │ 1 │ +│ 1 │ 3 │ +│ 2 │ 5 │ +└────────┴──────────────────────────────┘ +``` + +В следующем запросе пользовательская функция вызывает [условную функцию](../../../sql-reference/functions/conditional-functions.md): + +```sql +CREATE FUNCTION parity_str AS (n) -> if(n % 2, 'odd', 'even'); +SELECT number, parity_str(number) FROM numbers(3); +``` + +Результат: + +``` text +┌─number─┬─if(modulo(number, 2), 'odd', 'even')─┐ +│ 0 │ even │ +│ 1 │ odd │ +│ 2 │ even │ +└────────┴──────────────────────────────────────┘ +``` diff --git a/docs/ru/sql-reference/statements/create/index.md b/docs/ru/sql-reference/statements/create/index.md index dfa5c28fff7..61d4d053fec 100644 --- a/docs/ru/sql-reference/statements/create/index.md +++ b/docs/ru/sql-reference/statements/create/index.md @@ -12,6 +12,7 @@ toc_title: "Обзор" - [TABLE](../../../sql-reference/statements/create/table.md) - [VIEW](../../../sql-reference/statements/create/view.md) - [DICTIONARY](../../../sql-reference/statements/create/dictionary.md) +- [FUNCTION](../../../sql-reference/statements/create/function.md) - [USER](../../../sql-reference/statements/create/user.md) - [ROLE](../../../sql-reference/statements/create/role.md) - [ROW POLICY](../../../sql-reference/statements/create/row-policy.md) diff --git a/docs/ru/sql-reference/statements/create/table.md b/docs/ru/sql-reference/statements/create/table.md index 073cd4fa7c1..6601276d573 100644 --- a/docs/ru/sql-reference/statements/create/table.md +++ b/docs/ru/sql-reference/statements/create/table.md @@ -201,8 +201,6 @@ ALTER TABLE codec_example MODIFY COLUMN float_value CODEC(Default); Кодеки можно последовательно комбинировать, например, `CODEC(Delta, Default)`. -Чтобы выбрать наиболее подходящую для вашего проекта комбинацию кодеков, необходимо провести сравнительные тесты, подобные тем, что описаны в статье Altinity [New Encodings to Improve ClickHouse Efficiency](https://www.altinity.com/blog/2019/7/new-encodings-to-improve-clickhouse). Для столбцов типа `ALIAS` кодеки не применяются. - !!! warning "Предупреждение" Нельзя распаковать базу данных ClickHouse с помощью сторонних утилит наподобие `lz4`. Необходимо использовать специальную утилиту [clickhouse-compressor](https://github.com/ClickHouse/ClickHouse/tree/master/programs/compressor). @@ -247,6 +245,7 @@ CREATE TABLE codec_example ) ENGINE = MergeTree() ``` + ## Временные таблицы {#temporary-tables} ClickHouse поддерживает временные таблицы со следующими характеристиками: diff --git a/docs/ru/sql-reference/statements/create/view.md b/docs/ru/sql-reference/statements/create/view.md index 0be29b12aea..ccbf79baa73 100644 --- a/docs/ru/sql-reference/statements/create/view.md +++ b/docs/ru/sql-reference/statements/create/view.md @@ -5,7 +5,7 @@ toc_title: "Представление" # CREATE VIEW {#create-view} -Создаёт представление. Представления бывают двух видов - обычные и материализованные (MATERIALIZED). +Создаёт представление. Представления бывают [обычные](#normal), [материализованные](#materialized) (MATERIALIZED) и [LIVE](#live-view). ## Обычные представления {#normal} @@ -54,7 +54,7 @@ CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] [TO[db.]na Запрос `SELECT` может содержать `DISTINCT`, `GROUP BY`, `ORDER BY`, `LIMIT`… Следует иметь ввиду, что соответствующие преобразования будут выполняться независимо, на каждый блок вставляемых данных. Например, при наличии `GROUP BY`, данные будут агрегироваться при вставке, но только в рамках одной пачки вставляемых данных. Далее, данные не будут доагрегированы. Исключение - использование ENGINE, производящего агрегацию данных самостоятельно, например, `SummingMergeTree`. -Недоработано выполнение запросов `ALTER` над материализованными представлениями, поэтому они могут быть неудобными для использования. Если материализованное представление использует конструкцию `TO [db.]name`, то можно выполнить `DETACH` представления, `ALTER` для целевой таблицы и последующий `ATTACH` ранее отсоединенного (`DETACH`) представления. +Выполнение запросов [ALTER](../../../sql-reference/statements/alter/view.md) над материализованными представлениями имеет свои особенности, поэтому эти запросы могут быть неудобными для использования. Если материализованное представление использует конструкцию `TO [db.]name`, то можно выполнить `DETACH` представления, `ALTER` для целевой таблицы и последующий `ATTACH` ранее отсоединенного (`DETACH`) представления. Обратите внимание, что работа материализованного представления находится под влиянием настройки [optimize_on_insert](../../../operations/settings/settings.md#optimize-on-insert). Перед вставкой данных в таблицу происходит их слияние. @@ -62,7 +62,7 @@ CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] [TO[db.]na Чтобы удалить представление, следует использовать [DROP VIEW](../../../sql-reference/statements/drop.md#drop-view). Впрочем, `DROP TABLE` тоже работает для представлений. -## LIVE-представления {#live-view} +## LIVE-представления [экспериментальный функционал] {#live-view} !!! important "Важно" Представления `LIVE VIEW` являются экспериментальной возможностью. Их использование может повлечь потерю совместимости в будущих версиях. @@ -86,7 +86,7 @@ LIVE-представления работают по тому же принци В случаях, когда `LIVE VIEW` не обновляется автоматически, чтобы обновлять его принудительно с заданной периодичностью, используйте [WITH REFRESH](#live-view-with-refresh). -### Отслеживание изменений {#live-view-monitoring} +### Отслеживание изменений LIVE-представлений {#live-view-monitoring} Для отслеживания изменений LIVE-представления используйте запрос [WATCH](../../../sql-reference/statements/watch.md). @@ -108,12 +108,11 @@ WATCH lv; │ 1 │ 1 │ └────────┴──────────┘ ┌─sum(x)─┬─_version─┐ -│ 2 │ 2 │ +│ 3 │ 2 │ └────────┴──────────┘ ┌─sum(x)─┬─_version─┐ │ 6 │ 3 │ └────────┴──────────┘ -... ``` ```sql @@ -148,7 +147,7 @@ WATCH lv EVENTS; SELECT * FROM [db.]live_view WHERE ... ``` -### Принудительное обновление {#live-view-alter-refresh} +### Принудительное обновление LIVE-представлений {#live-view-alter-refresh} Чтобы принудительно обновить LIVE-представление, используйте запрос `ALTER LIVE VIEW [db.]table_name REFRESH`. @@ -220,13 +219,13 @@ WATCH lv; Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table default.lv doesn't exist.. ``` -### Использование {#live-view-usage} +### Использование LIVE-представлений {#live-view-usage} -Наиболее частые случаи использования `LIVE-VIEW`: +Наиболее частые случаи использования `LIVE-представлений`: - Получение push-уведомлений об изменениях данных без дополнительных периодических запросов. - Кеширование результатов часто используемых запросов для получения их без задержки. - Отслеживание изменений таблицы для запуска других запросов `SELECT`. - Отслеживание показателей из системных таблиц с помощью периодических обновлений. -[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/statements/create/view) +[Оригинальная статья](https://clickhouse.com/docs/ru/sql-reference/statements/create/view) diff --git a/docs/ru/sql-reference/statements/drop.md b/docs/ru/sql-reference/statements/drop.md index 118f8eb923a..437c2d02a94 100644 --- a/docs/ru/sql-reference/statements/drop.md +++ b/docs/ru/sql-reference/statements/drop.md @@ -97,3 +97,20 @@ DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name] DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster] ``` +## DROP FUNCTION {#drop-function} + +Удаляет пользовательскую функцию, созданную с помощью [CREATE FUNCTION](./create/function.md). +Удалить системные функции нельзя. + +**Синтаксис** + +``` sql +DROP FUNCTION [IF EXISTS] function_name +``` + +**Пример** + +``` sql +CREATE FUNCTION linear_equation AS (x, k, b) -> k*x + b; +DROP FUNCTION linear_equation; +``` diff --git a/docs/ru/sql-reference/statements/explain.md b/docs/ru/sql-reference/statements/explain.md index 7a028b31a12..8120df67139 100644 --- a/docs/ru/sql-reference/statements/explain.md +++ b/docs/ru/sql-reference/statements/explain.md @@ -413,4 +413,4 @@ EXPLAIN ESTIMATE SELECT * FROM ttt; └──────────┴───────┴───────┴──────┴───────┘ ``` -[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/statements/explain/) +[Оригинальная статья](https://clickhouse.com/docs/ru/sql-reference/statements/explain/) diff --git a/docs/ru/sql-reference/statements/grant.md b/docs/ru/sql-reference/statements/grant.md index 8d6605e1571..c970d4d24f3 100644 --- a/docs/ru/sql-reference/statements/grant.md +++ b/docs/ru/sql-reference/statements/grant.md @@ -109,11 +109,13 @@ GRANT SELECT(x,y) ON db.table TO john WITH GRANT OPTION - `CREATE TEMPORARY TABLE` - `CREATE VIEW` - `CREATE DICTIONARY` + - `CREATE FUNCTION` - [DROP](#grant-drop) - `DROP DATABASE` - `DROP TABLE` - `DROP VIEW` - `DROP DICTIONARY` + - `DROP FUNCTION` - [TRUNCATE](#grant-truncate) - [OPTIMIZE](#grant-optimize) - [SHOW](#grant-show) @@ -155,6 +157,8 @@ GRANT SELECT(x,y) ON db.table TO john WITH GRANT OPTION - `SYSTEM RELOAD CONFIG` - `SYSTEM RELOAD DICTIONARY` - `SYSTEM RELOAD EMBEDDED DICTIONARIES` + - `SYSTEM RELOAD FUNCTION` + - `SYSTEM RELOAD FUNCTIONS` - `SYSTEM MERGES` - `SYSTEM TTL MERGES` - `SYSTEM FETCHES` diff --git a/docs/ru/sql-reference/statements/optimize.md b/docs/ru/sql-reference/statements/optimize.md index 1f0c5a0ebe9..e6a71c4f611 100644 --- a/docs/ru/sql-reference/statements/optimize.md +++ b/docs/ru/sql-reference/statements/optimize.md @@ -18,7 +18,7 @@ OPTIMIZE TABLE [db.]name [ON CLUSTER cluster] [PARTITION partition | PARTITION I Может применяться к таблицам семейства [MergeTree](../../engines/table-engines/mergetree-family/mergetree.md), [MaterializedView](../../engines/table-engines/special/materializedview.md) и [Buffer](../../engines/table-engines/special/buffer.md). Другие движки таблиц не поддерживаются. -Если запрос `OPTIMIZE` применяется к таблицам семейства [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md), ClickHouse создаёт задачу на слияние и ожидает её исполнения на всех узлах (если активирована настройка `replication_alter_partitions_sync`). +Если запрос `OPTIMIZE` применяется к таблицам семейства [ReplicatedMergeTree](../../engines/table-engines/mergetree-family/replication.md), ClickHouse создаёт задачу на слияние и ожидает её исполнения на всех репликах (если значение настройки [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) равно `2`) или на текущей реплике (если значение настройки [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync) равно `1`). - По умолчанию, если запросу `OPTIMIZE` не удалось выполнить слияние, то ClickHouse не оповещает клиента. Чтобы включить оповещения, используйте настройку [optimize_throw_if_noop](../../operations/settings/settings.md#setting-optimize_throw_if_noop). @@ -26,6 +26,11 @@ ClickHouse не оповещает клиента. Чтобы включить - Если указать `FINAL`, то оптимизация выполняется даже в том случае, если все данные уже лежат в одном куске данных. Кроме того, слияние является принудительным, даже если выполняются параллельные слияния. - Если указать `DEDUPLICATE`, то произойдет схлопывание полностью одинаковых строк (сравниваются значения во всех столбцах), имеет смысл только для движка MergeTree. +Вы можете указать время ожидания (в секундах) выполнения запросов `OPTIMIZE` для неактивных реплик с помощью настройки [replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout). + +!!! info "Примечание" + Если значение настройки `replication_alter_partitions_sync` равно `2` и некоторые реплики не активны больше времени, заданного настройкой `replication_wait_for_inactive_replica_timeout`, то генерируется исключение `UNFINISHED`. + ## Выражение BY {#by-expression} Чтобы выполнить дедупликацию по произвольному набору столбцов, вы можете явно указать список столбцов или использовать любую комбинацию подстановки [`*`](../../sql-reference/statements/select/index.md#asterisk), выражений [`COLUMNS`](../../sql-reference/statements/select/index.md#columns-expression) и [`EXCEPT`](../../sql-reference/statements/select/index.md#except-modifier). diff --git a/docs/ru/sql-reference/statements/select/join.md b/docs/ru/sql-reference/statements/select/join.md index 03018a953ce..9f6d38a024f 100644 --- a/docs/ru/sql-reference/statements/select/join.md +++ b/docs/ru/sql-reference/statements/select/join.md @@ -6,7 +6,7 @@ toc_title: JOIN `JOIN` создаёт новую таблицу путем объединения столбцов из одной или нескольких таблиц с использованием общих для каждой из них значений. Это обычная операция в базах данных с поддержкой SQL, которая соответствует join из [реляционной алгебры](https://en.wikipedia.org/wiki/Relational_algebra#Joins_and_join-like_operators). Частный случай соединения одной таблицы часто называют self-join. -Синтаксис: +**Синтаксис** ``` sql SELECT @@ -19,7 +19,7 @@ FROM ## Поддерживаемые типы соединения {#select-join-types} -Все типы из стандартого [SQL JOIN](https://en.wikipedia.org/wiki/Join_(SQL)) поддерживаются: +Все типы из стандартного [SQL JOIN](https://en.wikipedia.org/wiki/Join_(SQL)) поддерживаются: - `INNER JOIN`, возвращаются только совпадающие строки. - `LEFT OUTER JOIN`, не совпадающие строки из левой таблицы возвращаются в дополнение к совпадающим строкам. @@ -33,9 +33,12 @@ FROM - `LEFT SEMI JOIN` и `RIGHT SEMI JOIN`, белый список по ключам соединения, не производит декартово произведение. - `LEFT ANTI JOIN` и `RIGHT ANTI JOIN`, черный список по ключам соединения, не производит декартово произведение. -- `LEFT ANY JOIN`, `RIGHT ANY JOIN` и `INNER ANY JOIN`, Частично (для противоположных сторон `LEFT` и `RIGHT`) или полностью (для `INNER` и `FULL`) отключает декартово произведение для стандартых видов `JOIN`. +- `LEFT ANY JOIN`, `RIGHT ANY JOIN` и `INNER ANY JOIN`, Частично (для противоположных сторон `LEFT` и `RIGHT`) или полностью (для `INNER` и `FULL`) отключает декартово произведение для стандартных видов `JOIN`. - `ASOF JOIN` и `LEFT ASOF JOIN`, Для соединения последовательностей по нечеткому совпадению. Использование `ASOF JOIN` описано ниже. +!!! note "Примечание" + Если настройка [join_algorithm](../../../operations/settings/settings.md#settings-join_algorithm) установлена в значение `partial_merge`, то для `RIGHT JOIN` и `FULL JOIN` поддерживается только уровень строгости `ALL` (`SEMI`, `ANTI`, `ANY` и `ASOF` не поддерживаются). + ## Настройки {#join-settings} Значение строгости по умолчанию может быть переопределено с помощью настройки [join_default_strictness](../../../operations/settings/settings.md#settings-join_default_strictness). @@ -52,6 +55,61 @@ FROM - [join_on_disk_max_files_to_merge](../../../operations/settings/settings.md#join_on_disk_max_files_to_merge) - [any_join_distinct_right_table_keys](../../../operations/settings/settings.md#any_join_distinct_right_table_keys) +## Условия в секции ON {on-section-conditions} + +Секция `ON` может содержать несколько условий, связанных оператором `AND`. Условия, задающие ключи соединения, должны содержать столбцы левой и правой таблицы и должны использовать оператор равенства. Прочие условия могут использовать другие логические операторы, но в отдельном условии могут использоваться столбцы либо только левой, либо только правой таблицы. +Строки объединяются только тогда, когда всё составное условие выполнено. Если оно не выполнено, то строки могут попасть в результат в зависимости от типа `JOIN`. Обратите внимание, что если то же самое условие поместить в секцию `WHERE`, то строки, для которых оно не выполняется, никогда не попаду в результат. + +!!! note "Примечание" + Оператор `OR` внутри секции `ON` пока не поддерживается. + +!!! note "Примечание" + Если в условии использованы столбцы из разных таблиц, то пока поддерживается только оператор равенства (`=`). + +**Пример** + +Рассмотрим `table_1` и `table_2`: + +``` +┌─Id─┬─name─┐ ┌─Id─┬─text───────────┬─scores─┐ +│ 1 │ A │ │ 1 │ Text A │ 10 │ +│ 2 │ B │ │ 1 │ Another text A │ 12 │ +│ 3 │ C │ │ 2 │ Text B │ 15 │ +└────┴──────┘ └────┴────────────────┴────────┘ +``` + +Запрос с одним условием, задающим ключ соединения, и дополнительным условием для `table_2`: + +``` sql +SELECT name, text FROM table_1 LEFT OUTER JOIN table_2 + ON table_1.Id = table_2.Id AND startsWith(table_2.text, 'Text'); +``` + +Обратите внимание, что результат содержит строку с именем `C` и пустым текстом. Строка включена в результат, потому что использован тип соединения `OUTER`. + +``` +┌─name─┬─text───┐ +│ A │ Text A │ +│ B │ Text B │ +│ C │ │ +└──────┴────────┘ +``` + +Запрос с типом соединения `INNER` и несколькими условиями: + +``` sql +SELECT name, text, scores FROM table_1 INNER JOIN table_2 + ON table_1.Id = table_2.Id AND table_2.scores > 10 AND startsWith(table_2.text, 'Text'); +``` + +Результат: + +``` +┌─name─┬─text───┬─scores─┐ +│ B │ Text B │ 15 │ +└──────┴────────┴────────┘ +``` + ## Использование ASOF JOIN {#asof-join-usage} `ASOF JOIN` применим в том случае, когда необходимо объединять записи, которые не имеют точного совпадения. @@ -59,7 +117,7 @@ FROM Для работы алгоритма необходим специальный столбец в таблицах. Этот столбец: - Должен содержать упорядоченную последовательность. -- Может быть одного из следующих типов: [Int*, UInt*](../../data-types/int-uint.md), [Float*](../../data-types/float.md), [Date](../../data-types/date.md), [DateTime](../../data-types/datetime.md), [Decimal*](../../data-types/decimal.md). +- Может быть одного из следующих типов: [Int, UInt](../../data-types/int-uint.md), [Float](../../data-types/float.md), [Date](../../data-types/date.md), [DateTime](../../data-types/datetime.md), [Decimal](../../data-types/decimal.md). - Не может быть единственным столбцом в секции `JOIN`. Синтаксис `ASOF JOIN ... ON`: diff --git a/docs/ru/sql-reference/statements/show.md b/docs/ru/sql-reference/statements/show.md index 7b5296e988e..f2b2c61e2bb 100644 --- a/docs/ru/sql-reference/statements/show.md +++ b/docs/ru/sql-reference/statements/show.md @@ -8,10 +8,10 @@ toc_title: SHOW ## SHOW CREATE TABLE {#show-create-table} ``` sql -SHOW CREATE [TEMPORARY] [TABLE|DICTIONARY] [db.]table [INTO OUTFILE filename] [FORMAT format] +SHOW CREATE [TEMPORARY] [TABLE|DICTIONARY|VIEW] [db.]table|view [INTO OUTFILE filename] [FORMAT format] ``` -Возвращает один столбец типа `String` с именем statement, содержащий одно значение — запрос `CREATE TABLE`, с помощью которого был создан указанный объект. +Возвращает один столбец типа `String` с именем statement, содержащий одно значение — запрос `CREATE`, с помощью которого был создан указанный объект. ## SHOW DATABASES {#show-databases} @@ -91,7 +91,7 @@ SHOW DATABASES LIMIT 2 ### Смотрите также {#see-also} -- [CREATE DATABASE](https://clickhouse.tech/docs/ru/sql-reference/statements/create/database/#query-language-create-database) +- [CREATE DATABASE](https://clickhouse.com/docs/ru/sql-reference/statements/create/database/#query-language-create-database) ## SHOW PROCESSLIST {#show-processlist} @@ -190,8 +190,8 @@ SHOW TABLES FROM system LIMIT 2 ### Смотрите также {#see-also} -- [Create Tables](https://clickhouse.tech/docs/ru/getting-started/tutorial/#create-tables) -- [SHOW CREATE TABLE](https://clickhouse.tech/docs/ru/sql-reference/statements/show/#show-create-table) +- [Create Tables](https://clickhouse.com/docs/ru/getting-started/tutorial/#create-tables) +- [SHOW CREATE TABLE](https://clickhouse.com/docs/ru/sql-reference/statements/show/#show-create-table) ## SHOW DICTIONARIES {#show-dictionaries} diff --git a/docs/ru/sql-reference/statements/system.md b/docs/ru/sql-reference/statements/system.md index e123f506d46..0eb0a5326f2 100644 --- a/docs/ru/sql-reference/statements/system.md +++ b/docs/ru/sql-reference/statements/system.md @@ -10,6 +10,8 @@ toc_title: SYSTEM - [RELOAD DICTIONARY](#query_language-system-reload-dictionary) - [RELOAD MODELS](#query_language-system-reload-models) - [RELOAD MODEL](#query_language-system-reload-model) +- [RELOAD FUNCTIONS](#query_language-system-reload-functions) +- [RELOAD FUNCTION](#query_language-system-reload-functions) - [DROP DNS CACHE](#query_language-system-drop-dns-cache) - [DROP MARK CACHE](#query_language-system-drop-mark-cache) - [DROP UNCOMPRESSED CACHE](#query_language-system-drop-uncompressed-cache) @@ -80,6 +82,17 @@ SYSTEM RELOAD MODELS SYSTEM RELOAD MODEL ``` +## RELOAD FUNCTIONS {#query_language-system-reload-functions} + +Перезагружает все зарегистрированные [исполняемые пользовательские функции](../functions/index.md#executable-user-defined-functions) или одну из них из файла конфигурации. + +**Синтаксис** + +```sql +RELOAD FUNCTIONS +RELOAD FUNCTION function_name +``` + ## DROP DNS CACHE {#query_language-system-drop-dns-cache} Сбрасывает внутренний DNS кеш ClickHouse. Иногда (для старых версий ClickHouse) необходимо использовать эту команду при изменении инфраструктуры (смене IP адреса у другого ClickHouse сервера или сервера, используемого словарями). diff --git a/docs/ru/sql-reference/statements/truncate.md b/docs/ru/sql-reference/statements/truncate.md index 63f7fa86ea5..028959690cd 100644 --- a/docs/ru/sql-reference/statements/truncate.md +++ b/docs/ru/sql-reference/statements/truncate.md @@ -13,4 +13,9 @@ TRUNCATE TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster] Запрос `TRUNCATE` не поддерживается для следующих движков: [View](../../engines/table-engines/special/view.md), [File](../../engines/table-engines/special/file.md), [URL](../../engines/table-engines/special/url.md), [Buffer](../../engines/table-engines/special/buffer.md) и [Null](../../engines/table-engines/special/null.md). +Вы можете настроить ожидание выполнения действий на репликах с помощью настройки [replication_alter_partitions_sync](../../operations/settings/settings.md#replication-alter-partitions-sync). +Вы можете указать время ожидания (в секундах) выполнения запросов `TRUNCATE` для неактивных реплик с помощью настройки [replication_wait_for_inactive_replica_timeout](../../operations/settings/settings.md#replication-wait-for-inactive-replica-timeout). + +!!! info "Примечание" + Если значение настройки `replication_alter_partitions_sync` равно `2` и некоторые реплики не активны больше времени, заданного настройкой `replication_wait_for_inactive_replica_timeout`, то генерируется исключение `UNFINISHED`. diff --git a/docs/ru/sql-reference/syntax.md b/docs/ru/sql-reference/syntax.md index 488e327dd31..6705b1068fe 100644 --- a/docs/ru/sql-reference/syntax.md +++ b/docs/ru/sql-reference/syntax.md @@ -3,7 +3,7 @@ toc_priority: 31 toc_title: "Синтаксис" --- -# Синтаксис {#sintaksis} +# Синтаксис {#syntax} В системе есть два вида парсеров: полноценный парсер SQL (recursive descent parser) и парсер форматов данных (быстрый потоковый парсер). Во всех случаях кроме запроса INSERT, используется только полноценный парсер SQL. @@ -21,11 +21,11 @@ INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def') Далее пойдёт речь о полноценном парсере. О парсерах форматов, смотри раздел «Форматы». -## Пробелы {#probely} +## Пробелы {#spaces} Между синтаксическими конструкциями (в том числе, в начале и конце запроса) может быть расположено произвольное количество пробельных символов. К пробельным символам относятся пробел, таб, перевод строки, CR, form feed. -## Комментарии {#kommentarii} +## Комментарии {#comments} Поддерживаются комментарии в SQL-стиле и C-стиле. Комментарии в SQL-стиле: от `--` до конца строки. Пробел после `--` может не ставиться. @@ -63,7 +63,7 @@ INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def') Существуют: числовые, строковые, составные литералы и `NULL`. -### Числовые {#chislovye} +### Числовые {#numeric} Числовой литерал пытается распарситься: @@ -83,7 +83,7 @@ INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def') Минимальный набор символов, которых вам необходимо экранировать в строковых литералах: `'` и `\`. Одинарная кавычка может быть экранирована одинарной кавычкой, литералы `'It\'s'` и `'It''s'` эквивалентны. -### Составные {#sostavnye} +### Составные {#compound} Поддерживаются конструкции для массивов: `[1, 2, 3]` и кортежей: `(1, 'Hello, world!', 2)`. На самом деле, это вовсе не литералы, а выражение с оператором создания массива и оператором создания кортежа, соответственно. @@ -102,17 +102,39 @@ INSERT INTO t VALUES (1, 'Hello, world'), (2, 'abc'), (3, 'def') В запросах можно проверить `NULL` с помощью операторов [IS NULL](operators/index.md#operator-is-null) и [IS NOT NULL](operators/index.md), а также соответствующих функций `isNull` и `isNotNull`. -## Функции {#funktsii} +### Heredoc {#heredeoc} + +Синтаксис [heredoc](https://ru.wikipedia.org/wiki/Heredoc-синтаксис) — это способ определения строк с сохранением исходного формата (часто с переносом строки). `Heredoc` задается как произвольный строковый литерал между двумя символами `$`, например `$heredoc$`. Значение между двумя `heredoc` обрабатывается "как есть". + +Синтаксис `heredoc` часто используют для вставки кусков кода SQL, HTML, XML и т.п. + +**Пример** + +Запрос: + +```sql +SELECT $smth$SHOW CREATE VIEW my_view$smth$; +``` + +Результат: + +```text +┌─'SHOW CREATE VIEW my_view'─┐ +│ SHOW CREATE VIEW my_view │ +└────────────────────────────┘ +``` + +## Функции {#functions} Функции записываются как идентификатор со списком аргументов (возможно, пустым) в скобках. В отличие от стандартного SQL, даже в случае пустого списка аргументов, скобки обязательны. Пример: `now()`. Бывают обычные и агрегатные функции (смотрите раздел «Агрегатные функции»). Некоторые агрегатные функции могут содержать два списка аргументов в круглых скобках. Пример: `quantile(0.9)(x)`. Такие агрегатные функции называются «параметрическими», а первый список аргументов называется «параметрами». Синтаксис агрегатных функций без параметров ничем не отличается от обычных функций. -## Операторы {#operatory} +## Операторы {#operators} Операторы преобразуются в соответствующие им функции во время парсинга запроса, с учётом их приоритета и ассоциативности. Например, выражение `1 + 2 * 3 + 4` преобразуется в `plus(plus(1, multiply(2, 3)), 4)`. -## Типы данных и движки таблиц {#tipy-dannykh-i-dvizhki-tablits} +## Типы данных и движки таблиц {#data_types-and-database-table-engines} Типы данных и движки таблиц в запросе `CREATE` записываются также, как идентификаторы или также как функции. То есть, могут содержать или не содержать список аргументов в круглых скобках. Подробнее смотрите разделы «Типы данных», «Движки таблиц», «CREATE». diff --git a/docs/ru/sql-reference/table-functions/index.md b/docs/ru/sql-reference/table-functions/index.md index fcd428df5d1..8cf90ba5bd5 100644 --- a/docs/ru/sql-reference/table-functions/index.md +++ b/docs/ru/sql-reference/table-functions/index.md @@ -34,4 +34,4 @@ toc_title: "Введение" | [hdfs](hdfs.md) | Создаёт таблицу с движком [HDFS](../../engines/table-engines/integrations/hdfs.md). | | [s3](s3.md) | Создаёт таблицу с движком [S3](../../engines/table-engines/integrations/s3.md). | -[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/table-functions/) +[Оригинальная статья](https://clickhouse.com/docs/ru/sql-reference/table-functions/) diff --git a/docs/ru/sql-reference/table-functions/jdbc.md b/docs/ru/sql-reference/table-functions/jdbc.md index 3955846d8db..e0bae8b5415 100644 --- a/docs/ru/sql-reference/table-functions/jdbc.md +++ b/docs/ru/sql-reference/table-functions/jdbc.md @@ -35,4 +35,4 @@ FROM jdbc('mysql-dev?datasource_column', 'show databases') a INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name ``` -[Оригинальная статья](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[Оригинальная статья](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/ru/sql-reference/table-functions/null.md b/docs/ru/sql-reference/table-functions/null.md index 44fbc111db2..90481e9f6a9 100644 --- a/docs/ru/sql-reference/table-functions/null.md +++ b/docs/ru/sql-reference/table-functions/null.md @@ -40,4 +40,4 @@ DROP TABLE IF EXISTS t; - [Движок таблиц Null](../../engines/table-engines/special/null.md) -[Original article](https://clickhouse.tech/docs/en/sql-reference/table-functions/null/) +[Original article](https://clickhouse.com/docs/en/sql-reference/table-functions/null/) diff --git a/docs/ru/sql-reference/table-functions/postgresql.md b/docs/ru/sql-reference/table-functions/postgresql.md index 76c2ee0fa18..f5c79e5305a 100644 --- a/docs/ru/sql-reference/table-functions/postgresql.md +++ b/docs/ru/sql-reference/table-functions/postgresql.md @@ -129,4 +129,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [Движок таблиц PostgreSQL](../../sql-reference/table-functions/postgresql.md) - [Использование PostgreSQL как источника данных для внешнего словаря](../../sql-reference/table-functions/postgresql.md#dicts-external_dicts_dict_sources-postgresql) -[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/table-functions/postgresql/) +[Оригинальная статья](https://clickhouse.com/docs/ru/sql-reference/table-functions/postgresql/) diff --git a/docs/ru/sql-reference/table-functions/s3.md b/docs/ru/sql-reference/table-functions/s3.md index 597f145c096..e3cb31fac85 100644 --- a/docs/ru/sql-reference/table-functions/s3.md +++ b/docs/ru/sql-reference/table-functions/s3.md @@ -133,9 +133,33 @@ INSERT INTO FUNCTION s3('https://storage.yandexcloud.net/my-test-bucket-768/test SELECT name, value FROM existing_table; ``` +## Партиционирование при записи данных {#partitioned-write} + +Если при добавлении данных в таблицу S3 указать выражение `PARTITION BY`, то для каждого значения ключа партиционирования создается отдельный файл. Это повышает эффективность операций чтения. + +**Примеры** + +1. При использовании ID партиции в имени ключа создаются отдельные файлы: + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket/file_{_partition_id}.csv', 'CSV', 'a UInt32, b UInt32, c UInt32') + PARTITION BY a VALUES ('x', 2, 3), ('x', 4, 5), ('y', 11, 12), ('y', 13, 14), ('z', 21, 22), ('z', 23, 24); +``` +В результате данные будут записаны в три файла: `file_x.csv`, `file_y.csv` и `file_z.csv`. + +2. При использовании ID партиции в названии бакета создаются файлы в разных бакетах: + +```sql +INSERT INTO TABLE FUNCTION + s3('http://bucket.amazonaws.com/my_bucket_{_partition_id}/file.csv', 'CSV', 'a UInt32, b UInt32, c UInt32') + PARTITION BY a VALUES (1, 2, 3), (1, 4, 5), (10, 11, 12), (10, 13, 14), (20, 21, 22), (20, 23, 24); +``` +В результате будут созданы три файла в разных бакетах: `my_bucket_1/file.csv`, `my_bucket_10/file.csv` и `my_bucket_20/file.csv`. + **Смотрите также** - [Движок таблиц S3](../../engines/table-engines/integrations/s3.md) -[Оригинальная статья](https://clickhouse.tech/docs/ru/sql-reference/table-functions/s3/) +[Оригинальная статья](https://clickhouse.com/docs/ru/sql-reference/table-functions/s3/) diff --git a/docs/ru/sql-reference/table-functions/sqlite.md b/docs/ru/sql-reference/table-functions/sqlite.md new file mode 100644 index 00000000000..3ff61455e62 --- /dev/null +++ b/docs/ru/sql-reference/table-functions/sqlite.md @@ -0,0 +1,45 @@ +--- +toc_priority: 55 +toc_title: sqlite +--- + +## sqlite {#sqlite} + +Позволяет выполнять запросы к данным, хранящимся в базе данных [SQLite](../../engines/database-engines/sqlite.md). + +**Синтаксис** + +``` sql + sqlite('db_path', 'table_name') +``` + +**Аргументы** + +- `db_path` — путь к файлу с базой данных SQLite. [String](../../sql-reference/data-types/string.md). +- `table_name` — имя таблицы в базе данных SQLite. [String](../../sql-reference/data-types/string.md). + +**Возвращаемое значение** + +- Объект таблицы с теми же столбцами, что и в исходной таблице `SQLite`. + +**Пример** + +Запрос: + +``` sql +SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2; +``` + +Результат: + +``` text +┌─col1──┬─col2─┐ +│ line1 │ 1 │ +│ line2 │ 2 │ +│ line3 │ 3 │ +└───────┴──────┘ +``` + +**См. также** + +- [SQLite](../../engines/table-engines/integrations/sqlite.md) движок таблиц \ No newline at end of file diff --git a/docs/ru/sql-reference/table-functions/view.md b/docs/ru/sql-reference/table-functions/view.md index bfd0a891179..498e76917ab 100644 --- a/docs/ru/sql-reference/table-functions/view.md +++ b/docs/ru/sql-reference/table-functions/view.md @@ -1,6 +1,6 @@ ## view {#view} -Преобразовывает подзапрос в таблицу. Функция реализовывает представления (смотрите [CREATE VIEW](https://clickhouse.tech/docs/ru/sql-reference/statements/create/view/#create-view)). Результирующая таблица не хранит данные, а только сохраняет указанный запрос `SELECT`. При чтении из таблицы, ClickHouse выполняет запрос и удаляет все ненужные столбцы из результата. +Преобразовывает подзапрос в таблицу. Функция реализовывает представления (смотрите [CREATE VIEW](https://clickhouse.com/docs/ru/sql-reference/statements/create/view/#create-view)). Результирующая таблица не хранит данные, а только сохраняет указанный запрос `SELECT`. При чтении из таблицы, ClickHouse выполняет запрос и удаляет все ненужные столбцы из результата. **Синтаксис** @@ -46,7 +46,7 @@ SELECT * FROM view(SELECT name FROM months); └──────────┘ ``` -Вы можете использовать функцию `view` как параметр табличных функций [remote](https://clickhouse.tech/docs/ru/sql-reference/table-functions/remote/#remote-remotesecure) и [cluster](https://clickhouse.tech/docs/ru/sql-reference/table-functions/cluster/#cluster-clusterallreplicas): +Вы можете использовать функцию `view` как параметр табличных функций [remote](https://clickhouse.com/docs/ru/sql-reference/table-functions/remote/#remote-remotesecure) и [cluster](https://clickhouse.com/docs/ru/sql-reference/table-functions/cluster/#cluster-clusterallreplicas): ``` sql SELECT * FROM remote(`127.0.0.1`, view(SELECT a, b, c FROM table_name)); @@ -58,6 +58,6 @@ SELECT * FROM cluster(`cluster_name`, view(SELECT a, b, c FROM table_name)); **Смотрите также** -- [view](https://clickhouse.tech/docs/ru/engines/table-engines/special/view/#table_engines-view) +- [view](https://clickhouse.com/docs/ru/engines/table-engines/special/view/#table_engines-view) -[Оригинальная статья](https://clickhouse.tech/docs/en/sql-reference/table-functions/view/) +[Оригинальная статья](https://clickhouse.com/docs/en/sql-reference/table-functions/view/) diff --git a/docs/ru/sql-reference/window-functions/index.md b/docs/ru/sql-reference/window-functions/index.md new file mode 120000 index 00000000000..206505bf0eb --- /dev/null +++ b/docs/ru/sql-reference/window-functions/index.md @@ -0,0 +1 @@ +../../../en/sql-reference/window-functions/index.md \ No newline at end of file diff --git a/docs/ru/whats-new/changelog/2020.md b/docs/ru/whats-new/changelog/2020.md new file mode 120000 index 00000000000..f0fb97311d2 --- /dev/null +++ b/docs/ru/whats-new/changelog/2020.md @@ -0,0 +1 @@ +../../../en/whats-new/changelog/2020.md \ No newline at end of file diff --git a/docs/ru/whats-new/index.md b/docs/ru/whats-new/index.md index d8a26423813..f3d6e2839bc 100644 --- a/docs/ru/whats-new/index.md +++ b/docs/ru/whats-new/index.md @@ -5,4 +5,4 @@ toc_priority: 82 # Что нового в ClickHouse? -Планы развития вкратце изложены [здесь](extended-roadmap.md), а новости по предыдущим релизам подробно описаны в [журнале изменений](changelog/index.md). +Планы развития вкратце изложены [здесь](https://github.com/ClickHouse/ClickHouse/issues/17623), а новости по предыдущим релизам подробно описаны в [журнале изменений](changelog/index.md). diff --git a/docs/ru/whats-new/roadmap.md b/docs/ru/whats-new/roadmap.md new file mode 120000 index 00000000000..2c383b2ad5d --- /dev/null +++ b/docs/ru/whats-new/roadmap.md @@ -0,0 +1 @@ +../../en/whats-new/roadmap.md \ No newline at end of file diff --git a/docs/tools/README.md b/docs/tools/README.md index 61a2e9a04f2..4ab44b0d945 100644 --- a/docs/tools/README.md +++ b/docs/tools/README.md @@ -2,7 +2,7 @@ ClickHouse documentation is built using [build.py](build.py) script that uses [mkdocs](https://www.mkdocs.org) library and it’s dependencies to separately build all version of documentations (all languages in either single and multi page mode) as static HTMLs and then a PDF for each single page version. The results are then put in the correct directory structure. It is recommended to use Python 3.7 to run this script. -[release.sh](release.sh) also pulls static files needed for [official ClickHouse website](https://clickhouse.tech) from [../../website](../../website) folder then pushes to specified GitHub repo to be served via [GitHub Pages](https://pages.github.com). +[release.sh](release.sh) also pulls static files needed for [official ClickHouse website](https://clickhouse.com) from [../../website](../../website) folder then pushes to specified GitHub repo to be served via [GitHub Pages](https://pages.github.com). ## How to check if the documentation will look fine? {#how-to-check-if-the-documentation-will-look-fine} @@ -59,4 +59,4 @@ is used. At the moment there’s no easy way to do just that, but you can consider: - To hit the “Watch” button on top of GitHub web interface to know as early as possible, even during pull request. Alternative to this is `#github-activity` channel of [public ClickHouse Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-qfort0u8-TWqK4wIP0YSdoDE0btKa1w). -- Some search engines allow to subscribe on specific website changes via email and you can opt-in for that for https://clickhouse.tech. +- Some search engines allow to subscribe on specific website changes via email and you can opt-in for that for https://clickhouse.com. diff --git a/docs/tools/blog.py b/docs/tools/blog.py index d0f2496f914..bfc8c0908e9 100644 --- a/docs/tools/blog.py +++ b/docs/tools/blog.py @@ -51,7 +51,7 @@ def build_for_lang(lang, args): if args.htmlproofer: plugins.append('htmlproofer') - website_url = 'https://clickhouse.tech' + website_url = 'https://clickhouse.com' site_name = site_names.get(lang, site_names['en']) blog_nav, post_meta = nav.build_blog_nav(lang, args) raw_config = dict( @@ -62,7 +62,7 @@ def build_for_lang(lang, args): strict=True, theme=theme_cfg, nav=blog_nav, - copyright='©2016–2021 Yandex LLC', + copyright='©2016–2021 ClickHouse, Inc.', use_directory_urls=True, repo_name='ClickHouse/ClickHouse', repo_url='https://github.com/ClickHouse/ClickHouse/', diff --git a/docs/tools/build.py b/docs/tools/build.py index dae61eec87e..aa440ecb5dc 100755 --- a/docs/tools/build.py +++ b/docs/tools/build.py @@ -84,7 +84,7 @@ def build_for_lang(lang, args): if args.htmlproofer: plugins.append('htmlproofer') - website_url = 'https://clickhouse.tech' + website_url = 'https://clickhouse.com' site_name = site_names.get(lang, site_names['en']) % '' site_name = site_name.replace(' ', ' ') @@ -95,7 +95,7 @@ def build_for_lang(lang, args): site_dir=site_dir, strict=True, theme=theme_cfg, - copyright='©2016–2021 Yandex LLC', + copyright='©2016–2021 ClickHouse, Inc.', use_directory_urls=True, repo_name='ClickHouse/ClickHouse', repo_url='https://github.com/ClickHouse/ClickHouse/', @@ -203,6 +203,7 @@ if __name__ == '__main__': arg_parser.add_argument('--verbose', action='store_true') args = arg_parser.parse_args() + args.minify = False # TODO remove logging.basicConfig( level=logging.DEBUG if args.verbose else logging.INFO, diff --git a/docs/tools/cmake_in_clickhouse_generator.py b/docs/tools/cmake_in_clickhouse_generator.py index 1414ffc4b9e..8b440823df3 100644 --- a/docs/tools/cmake_in_clickhouse_generator.py +++ b/docs/tools/cmake_in_clickhouse_generator.py @@ -155,6 +155,12 @@ def generate_cmake_flags_files() -> None: with open(footer_file_name, "r") as footer: f.write(footer.read()) + other_languages = ["docs/ja/development/cmake-in-clickhouse.md", + "docs/zh/development/cmake-in-clickhouse.md", + "docs/ru/development/cmake-in-clickhouse.md"] + + for lang in other_languages: + os.symlink(output_file_name, os.path.join(root_path, lang)) if __name__ == '__main__': generate_cmake_flags_files() diff --git a/docs/tools/deploy-to-test.sh b/docs/tools/deploy-to-test.sh index 44e7687c905..30771052535 100755 --- a/docs/tools/deploy-to-test.sh +++ b/docs/tools/deploy-to-test.sh @@ -7,8 +7,8 @@ # 1) Set up building documentation according to https://github.com/ClickHouse/ClickHouse/tree/master/docs/tools#use-buildpy-use-build-py # 2) Create https://github.com/GIT_USER/clickhouse.github.io repo (replace GIT_USER with your GitHub login) # 3) Enable GitHub Pages in settings of this repo -# 4) Add file named CNAME in root of this repo with "GIT_USER-test.clickhouse.tech" content (without quotes) -# 5) Send email on address from https://clickhouse.tech/#contacts asking to create GIT_USER-test.clickhouse.tech domain +# 4) Add file named CNAME in root of this repo with "GIT_USER-test.clickhouse.com" content (without quotes) +# 5) Send email on address from https://clickhouse.com/#contacts asking to create GIT_USER-test.clickhouse.com domain # set -ex @@ -16,7 +16,7 @@ BASE_DIR=$(dirname $(readlink -f $0)) GIT_USER=${GIT_USER:-$USER} GIT_TEST_URI=git@github.com:${GIT_USER}/clickhouse.github.io.git \ - BASE_DOMAIN=${GIT_USER}-test.clickhouse.tech \ + BASE_DOMAIN=${GIT_USER}-test.clickhouse.com \ EXTRA_BUILD_ARGS="${@}" \ CLOUDFLARE_TOKEN="" \ HISTORY_SIZE=3 \ diff --git a/docs/tools/mdx_clickhouse.py b/docs/tools/mdx_clickhouse.py index 387ade9bbdf..18ecc890b6e 100755 --- a/docs/tools/mdx_clickhouse.py +++ b/docs/tools/mdx_clickhouse.py @@ -53,7 +53,7 @@ class ClickHouseLinkMixin(object): href = el.get('href') or '' is_external = href.startswith('http:') or href.startswith('https:') if is_external: - if not href.startswith('https://clickhouse.tech'): + if not href.startswith('https://clickhouse.com'): el.set('rel', 'external nofollow noreferrer') elif single_page: if '#' in href: @@ -73,12 +73,8 @@ class ClickHouseLinkPattern(ClickHouseLinkMixin, markdown.inlinepatterns.LinkInl class ClickHousePreprocessor(markdown.util.Processor): def run(self, lines): - if os.getenv('QLOUD_TOKEN'): - for line in lines: - if '' not in line: - yield line - else: - for line in lines: + for line in lines: + if '' not in line: yield line diff --git a/docs/tools/package-lock.json b/docs/tools/package-lock.json new file mode 100644 index 00000000000..98b3f74702f --- /dev/null +++ b/docs/tools/package-lock.json @@ -0,0 +1,7561 @@ +{ + "name": "build", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "dev": true + }, + "@babel/core": { + "version": "7.15.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", + "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helpers": "^7.15.4", + "@babel/parser": "^7.15.5", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", + "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", + "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", + "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", + "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", + "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "dev": true, + "requires": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", + "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-function-name": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", + "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", + "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", + "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", + "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-imports": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", + "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-module-transforms": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.4.tgz", + "integrity": "sha512-9fHHSGE9zTC++KuXLZcB5FKgvlV83Ox+NLUmQTawovwlJ85+QMhk1CnVk406CQVj97LaWod6KVjl2Sfgw9Aktw==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.15.4", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-simple-access": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", + "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", + "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-wrap-function": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-replace-supers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", + "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-simple-access": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", + "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", + "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", + "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", + "dev": true, + "requires": { + "@babel/types": "^7.15.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", + "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.15.4", + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/helpers": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", + "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", + "dev": true, + "requires": { + "@babel/template": "^7.15.4", + "@babel/traverse": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.15.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.5.tgz", + "integrity": "sha512-2hQstc6I7T6tQsWzlboMh3SgMRPaS4H6H7cPQsJkdzTzEGqQrpLDsE2BGASU5sBPoEQyHzeqU6C8uKbFeEk6sg==", + "dev": true + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", + "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + } + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", + "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.15.4", + "@babel/plugin-syntax-async-generators": "^7.8.4" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", + "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", + "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.14.7", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.14.5" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", + "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-create-class-features-plugin": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", + "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-optimise-call-expression": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", + "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", + "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.15.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", + "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-module-transforms": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", + "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/preset-env": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.4.tgz", + "integrity": "sha512-4f2nLw+q6ht8gl3sHCmNhmA5W6b1ItLzbH3UrKuJxACHr2eCpk96jwjrAfCAaXaaVwTQGnyUYHY2EWXJGt7TUQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.4", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.15.4", + "@babel/plugin-proposal-async-generator-functions": "^7.15.4", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.15.4", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.14.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.15.4", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.15.3", + "@babel/plugin-transform-classes": "^7.15.4", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.15.4", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.4", + "@babel/plugin-transform-modules-systemjs": "^7.15.4", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.15.4", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.14.6", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.4", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.2", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", + "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", + "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4" + } + }, + "@babel/traverse": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", + "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.4", + "@babel/helper-function-name": "^7.15.4", + "@babel/helper-hoist-variables": "^7.15.4", + "@babel/helper-split-export-declaration": "^7.15.4", + "@babel/parser": "^7.15.4", + "@babel/types": "^7.15.4", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.15.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.4.tgz", + "integrity": "sha512-0f1HJFuGmmbrKTCZtbm3cU+b/AqdEYk5toj5iQur58xkVMlS0JWaKxTBSmCXd47uiN7vbcozAupm6Mvs80GNhw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + } + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "@types/q": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", + "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-errors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", + "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", + "dev": true + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "amphtml-validator": { + "version": "1.0.35", + "resolved": "https://registry.npmjs.org/amphtml-validator/-/amphtml-validator-1.0.35.tgz", + "integrity": "sha512-C67JzC5EI6pE2C0sAo/zuCp8ARDl1Vtt6/s0nr+3NuXDNOdkjclZUkaNAd/ZnsEvvYodkXZ6T/uww890IQh9dQ==", + "requires": { + "colors": "1.4.0", + "commander": "7.2.0", + "promise": "8.1.0" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true, + "optional": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "autoprefixer": { + "version": "9.8.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", + "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", + "dev": true, + "requires": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + } + }, + "babel-loader": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", + "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", + "dev": true, + "requires": { + "find-cache-dir": "^3.3.1", + "loader-utils": "^1.4.0", + "make-dir": "^3.1.0", + "schema-utils": "^2.6.5" + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", + "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.14.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "dev": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "bn.js": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", + "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", + "dev": true + }, + "boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "bootstrap": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", + "integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "requires": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "browserslist": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", + "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001254", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.830", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" + } + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cacache": { + "version": "12.0.4", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", + "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", + "dev": true, + "requires": { + "bluebird": "^3.5.5", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.4", + "graceful-fs": "^4.1.15", + "infer-owner": "^1.0.3", + "lru-cache": "^5.1.1", + "mississippi": "^3.0.0", + "mkdirp": "^0.5.1", + "move-concurrently": "^1.0.1", + "promise-inflight": "^1.0.1", + "rimraf": "^2.6.3", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", + "y18n": "^4.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + }, + "camel-case": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", + "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.1" + } + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "caniuse-lite": { + "version": "1.0.30001255", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001255.tgz", + "integrity": "sha512-F+A3N9jTZL882f/fg/WWVnKSu6IOo3ueLz4zwaOPbPYHNmM/ZaDUyzyJwS1mZhX7Ex5jqTyW599Gdelh5PDYLQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "change-case": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-3.1.0.tgz", + "integrity": "sha512-2AZp7uJZbYEzRPsFoa+ijKdvp9zsrnnt6+yFokfwEpeJm0xuJDVoxiRCAaTzyJND8GJkofo2IcKWaUZ/OECVzw==", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "constant-case": "^2.0.0", + "dot-case": "^2.1.0", + "header-case": "^1.0.0", + "is-lower-case": "^1.1.0", + "is-upper-case": "^1.1.0", + "lower-case": "^1.1.1", + "lower-case-first": "^1.0.0", + "no-case": "^2.3.2", + "param-case": "^2.1.0", + "pascal-case": "^2.0.0", + "path-case": "^2.1.0", + "sentence-case": "^2.1.0", + "snake-case": "^2.1.0", + "swap-case": "^1.1.0", + "title-case": "^2.1.0", + "upper-case": "^1.1.1", + "upper-case-first": "^1.1.0" + } + }, + "chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "requires": { + "source-map": "~0.6.0" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "coa": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", + "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", + "dev": true, + "requires": { + "@types/q": "^1.5.1", + "chalk": "^2.4.1", + "q": "^1.1.2" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "dev": true, + "requires": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "color-string": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz", + "integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==", + "dev": true, + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constant-case": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz", + "integrity": "sha1-QXV2TTidP6nI7NKRhu1gBSQ7akY=", + "dev": true, + "requires": { + "snake-case": "^2.1.0", + "upper-case": "^1.1.1" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", + "integrity": "sha1-8dgClQr33SYxof6+BZZVDIarMZA=" + }, + "copy-concurrently": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz", + "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "fs-write-stream-atomic": "^1.0.8", + "iferr": "^0.1.5", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.0" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js-compat": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.17.2.tgz", + "integrity": "sha512-lHnt7A1Oqplebl5i0MrQyFv/yyEzr9p29OjlkcsFRDDgHwwQyVckfRGJ790qzXhkwM8ba4SFHHa2sO+T5f1zGg==", + "dev": true, + "requires": { + "browserslist": "^4.16.8", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "dependencies": { + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + } + } + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + } + }, + "css-color-names": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", + "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=", + "dev": true + }, + "css-declaration-sorter": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", + "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", + "dev": true, + "requires": { + "postcss": "^7.0.1", + "timsort": "^0.3.0" + } + }, + "css-node-extract": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/css-node-extract/-/css-node-extract-2.1.3.tgz", + "integrity": "sha512-E7CzbC0I4uAs2dI8mPCVe+K37xuja5kjIugOotpwICFL7vzhmFMAPHvS/MF9gFrmv8DDUANsxrgyT/I3OLukcw==", + "dev": true, + "requires": { + "change-case": "^3.0.1", + "postcss": "^6.0.14" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "css-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", + "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "dev": true, + "requires": { + "boolbase": "^1.0.0", + "css-what": "^3.2.1", + "domutils": "^1.7.0", + "nth-check": "^1.0.2" + } + }, + "css-select-base-adapter": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", + "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==", + "dev": true + }, + "css-selector-extract": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/css-selector-extract/-/css-selector-extract-3.3.6.tgz", + "integrity": "sha512-bBI8ZJKKyR9iHvxXb4t3E6WTMkis94eINopVg7y2FmmMjLXUVduD7mPEcADi4i9FX4wOypFMFpySX+0keuefxg==", + "dev": true, + "requires": { + "postcss": "^6.0.14" + }, + "dependencies": { + "postcss": { + "version": "6.0.23", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", + "integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "source-map": "^0.6.1", + "supports-color": "^5.4.0" + } + } + } + }, + "css-tree": { + "version": "1.0.0-alpha.37", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", + "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "dev": true, + "requires": { + "mdn-data": "2.0.4", + "source-map": "^0.6.1" + } + }, + "css-what": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", + "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==", + "dev": true + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "cssnano": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.11.tgz", + "integrity": "sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "cssnano-preset-default": "^4.0.8", + "is-resolvable": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "cssnano-preset-default": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz", + "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==", + "dev": true, + "requires": { + "css-declaration-sorter": "^4.0.1", + "cssnano-util-raw-cache": "^4.0.1", + "postcss": "^7.0.0", + "postcss-calc": "^7.0.1", + "postcss-colormin": "^4.0.3", + "postcss-convert-values": "^4.0.1", + "postcss-discard-comments": "^4.0.2", + "postcss-discard-duplicates": "^4.0.2", + "postcss-discard-empty": "^4.0.1", + "postcss-discard-overridden": "^4.0.1", + "postcss-merge-longhand": "^4.0.11", + "postcss-merge-rules": "^4.0.3", + "postcss-minify-font-values": "^4.0.2", + "postcss-minify-gradients": "^4.0.2", + "postcss-minify-params": "^4.0.2", + "postcss-minify-selectors": "^4.0.2", + "postcss-normalize-charset": "^4.0.1", + "postcss-normalize-display-values": "^4.0.2", + "postcss-normalize-positions": "^4.0.2", + "postcss-normalize-repeat-style": "^4.0.2", + "postcss-normalize-string": "^4.0.2", + "postcss-normalize-timing-functions": "^4.0.2", + "postcss-normalize-unicode": "^4.0.1", + "postcss-normalize-url": "^4.0.1", + "postcss-normalize-whitespace": "^4.0.2", + "postcss-ordered-values": "^4.1.2", + "postcss-reduce-initial": "^4.0.3", + "postcss-reduce-transforms": "^4.0.2", + "postcss-svgo": "^4.0.3", + "postcss-unique-selectors": "^4.0.1" + } + }, + "cssnano-util-get-arguments": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", + "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=", + "dev": true + }, + "cssnano-util-get-match": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", + "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=", + "dev": true + }, + "cssnano-util-raw-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", + "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "cssnano-util-same-parent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", + "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==", + "dev": true + }, + "csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "requires": { + "css-tree": "^1.1.2" + }, + "dependencies": { + "css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "requires": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + } + }, + "mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + } + } + }, + "cyclist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz", + "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=", + "dev": true + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "dot-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-2.1.1.tgz", + "integrity": "sha1-NNzzf1Co6TwrO8qLt/uRVcfaO+4=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "electron-to-chromium": { + "version": "1.3.832", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.832.tgz", + "integrity": "sha512-x7lO8tGoW0CyV53qON4Lb5Rok9ipDelNdBIAiYUZ03dqy4u9vohMM1qV047+s/hiyJiqUWX/3PNwkX3kexX5ig==", + "dev": true + }, + "elliptic": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", + "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "dev": true, + "requires": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz", + "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.5.0", + "tapable": "^1.0.0" + }, + "dependencies": { + "memory-fs": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", + "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + } + } + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + }, + "errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.18.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.6.tgz", + "integrity": "sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-string": "^1.0.7", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "figgy-pudding": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz", + "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==", + "dev": true + }, + "file-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", + "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", + "dev": true, + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "iferr": "^0.1.5", + "imurmurhash": "^0.1.4", + "readable-stream": "1 || 2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "header-case": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz", + "integrity": "sha1-lTWXMZfBRLCWE81l0xfvGZY70C0=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.1.3" + } + }, + "hex-color-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", + "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" + }, + "hsl-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", + "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=", + "dev": true + }, + "hsla-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", + "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, + "iferr": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", + "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=", + "dev": true + }, + "import-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-2.1.0.tgz", + "integrity": "sha1-qmzzbnInYShcs3HsZRn1PiQ1sKk=", + "dev": true, + "requires": { + "import-from": "^2.1.0" + } + }, + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } + }, + "import-from": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-2.1.0.tgz", + "integrity": "sha1-M1238qev/VOqpHHUuAId7ja387E=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "import-local": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", + "dev": true, + "requires": { + "pkg-dir": "^3.0.0", + "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, + "infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-absolute-url": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", + "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-color-stop": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", + "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "dev": true, + "requires": { + "css-color-names": "^0.0.4", + "hex-color-regex": "^1.1.0", + "hsl-regex": "^1.0.0", + "hsla-regex": "^1.0.0", + "rgb-regex": "^1.0.1", + "rgba-regex": "^1.0.0" + } + }, + "is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-lower-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-lower-case/-/is-lower-case-1.1.3.tgz", + "integrity": "sha1-fhR75HaNxGbbO/shzGCzHmrWk5M=", + "dev": true, + "requires": { + "lower-case": "^1.1.0" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-upper-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-upper-case/-/is-upper-case-1.1.2.tgz", + "integrity": "sha1-jQsfp+eTOh5YSDYA7H2WYcuvdW8=", + "dev": true, + "requires": { + "upper-case": "^1.1.0" + } + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz", + "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "lower-case": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", + "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", + "dev": true + }, + "lower-case-first": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/lower-case-first/-/lower-case-first-1.0.2.tgz", + "integrity": "sha1-5dp8JvKacHO+AtUrrJmA5ZIq36E=", + "dev": true, + "requires": { + "lower-case": "^1.1.2" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mdn-data": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", + "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", + "dev": true + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mississippi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", + "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", + "dev": true, + "requires": { + "concat-stream": "^1.5.0", + "duplexify": "^3.4.2", + "end-of-stream": "^1.1.0", + "flush-write-stream": "^1.0.0", + "from2": "^2.1.0", + "parallel-transform": "^1.1.0", + "pump": "^3.0.0", + "pumpify": "^1.3.3", + "stream-each": "^1.1.0", + "through2": "^2.0.0" + } + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "move-concurrently": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", + "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=", + "dev": true, + "requires": { + "aproba": "^1.1.1", + "copy-concurrently": "^1.0.0", + "fs-write-stream-atomic": "^1.0.8", + "mkdirp": "^0.5.1", + "rimraf": "^2.5.4", + "run-queue": "^1.0.3" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "nan": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", + "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "no-case": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", + "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "dev": true, + "requires": { + "lower-case": "^1.1.1" + } + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "node-releases": { + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true + }, + "node-sass-glob-importer": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/node-sass-glob-importer/-/node-sass-glob-importer-5.3.2.tgz", + "integrity": "sha512-QTX7KPsISgp55REV6pMH703nzHfWCOEYEQC0cDyTRo7XO6WDvyC0OAzekuQ4gs505IZcxv9KxZ3uPJ5s5H9D3g==", + "dev": true, + "requires": { + "node-sass-magic-importer": "^5.3.2" + } + }, + "node-sass-magic-importer": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/node-sass-magic-importer/-/node-sass-magic-importer-5.3.2.tgz", + "integrity": "sha512-T3wTUdUoXQE3QN+EsyPpUXRI1Gj1lEsrySQ9Kzlzi15QGKi+uRa9fmvkcSy2y3BKgoj//7Mt9+s+7p0poMpg6Q==", + "dev": true, + "requires": { + "css-node-extract": "^2.1.3", + "css-selector-extract": "^3.3.6", + "findup-sync": "^3.0.0", + "glob": "^7.1.3", + "object-hash": "^1.3.1", + "postcss-scss": "^2.0.0", + "resolve": "^1.10.1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true + }, + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "nth-check": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", + "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "dev": true, + "requires": { + "boolbase": "~1.0.0" + } + }, + "num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-hash": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz", + "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", + "dev": true + }, + "object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, + "object.getownpropertydescriptors": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", + "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parallel-transform": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", + "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==", + "dev": true, + "requires": { + "cyclist": "^1.0.1", + "inherits": "^2.0.3", + "readable-stream": "^2.1.5" + } + }, + "param-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", + "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascal-case": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-2.0.1.tgz", + "integrity": "sha1-LVeNNFX2YNpl7KGO+VtODekSdh4=", + "dev": true, + "requires": { + "camel-case": "^3.0.0", + "upper-case-first": "^1.1.0" + } + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/path-case/-/path-case-2.1.1.tgz", + "integrity": "sha1-lLgDfDctP+KQbkZbtF4l0ibo7qU=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true, + "optional": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "^2.0.0" + } + }, + "pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-calc": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", + "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", + "dev": true, + "requires": { + "postcss": "^7.0.27", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + } + }, + "postcss-colormin": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", + "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "color": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-convert-values": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", + "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-discard-comments": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", + "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-duplicates": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", + "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-empty": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", + "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-discard-overridden": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", + "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-load-config": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-2.1.2.tgz", + "integrity": "sha512-/rDeGV6vMUo3mwJZmeHfEDvwnTKKqQ0S7OHUi/kJvvtx3aWtyWG2/0ZWnzCt2keEclwN6Tf0DST2v9kITdOKYw==", + "dev": true, + "requires": { + "cosmiconfig": "^5.0.0", + "import-cwd": "^2.0.0" + } + }, + "postcss-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-3.0.0.tgz", + "integrity": "sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "postcss": "^7.0.0", + "postcss-load-config": "^2.0.0", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "postcss-merge-longhand": { + "version": "4.0.11", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", + "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", + "dev": true, + "requires": { + "css-color-names": "0.0.4", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "stylehacks": "^4.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-merge-rules": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", + "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "cssnano-util-same-parent": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0", + "vendors": "^1.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-minify-font-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", + "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-gradients": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", + "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "is-color-stop": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-params": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", + "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "browserslist": "^4.0.0", + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "uniqs": "^2.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-minify-selectors": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", + "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "postcss-normalize-charset": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", + "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + } + }, + "postcss-normalize-display-values": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", + "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-positions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", + "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-repeat-style": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", + "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-string": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", + "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", + "dev": true, + "requires": { + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-timing-functions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", + "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-unicode": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", + "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-url": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", + "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", + "dev": true, + "requires": { + "is-absolute-url": "^2.0.0", + "normalize-url": "^3.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-normalize-whitespace": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", + "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-ordered-values": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", + "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", + "dev": true, + "requires": { + "cssnano-util-get-arguments": "^4.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-reduce-initial": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", + "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "caniuse-api": "^3.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0" + } + }, + "postcss-reduce-transforms": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", + "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", + "dev": true, + "requires": { + "cssnano-util-get-match": "^4.0.0", + "has": "^1.0.0", + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-scss": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", + "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", + "dev": true, + "requires": { + "postcss": "^7.0.6" + } + }, + "postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-svgo": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz", + "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==", + "dev": true, + "requires": { + "postcss": "^7.0.0", + "postcss-value-parser": "^3.0.0", + "svgo": "^1.0.0" + }, + "dependencies": { + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + } + } + }, + "postcss-unique-selectors": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", + "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", + "dev": true, + "requires": { + "alphanum-sort": "^1.0.0", + "postcss": "^7.0.0", + "uniqs": "^2.0.0" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", + "dev": true + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + }, + "dependencies": { + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "purify-css": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/purify-css/-/purify-css-1.2.5.tgz", + "integrity": "sha512-Vy4jRnV2w/kUjTyxzQOKbFkqwUe6RNLuZgIWR/IRQ8nCqRwiFgwC9XiO9+8poq5KL053uWAQnCSbsfihq77zPg==", + "requires": { + "clean-css": "^4.0.12", + "glob": "^7.1.1", + "rework": "^1.0.1", + "uglify-js": "^3.0.6", + "yargs": "^8.0.1" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true, + "optional": true + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "dev": true, + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rework": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz", + "integrity": "sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc=", + "requires": { + "convert-source-map": "^0.3.3", + "css": "^2.0.0" + } + }, + "rgb-regex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", + "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=", + "dev": true + }, + "rgba-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", + "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=", + "dev": true + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-queue": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", + "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=", + "dev": true, + "requires": { + "aproba": "^1.1.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sass": { + "version": "1.39.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.39.0.tgz", + "integrity": "sha512-F4o+RhJkNOIG0b6QudYU8c78ZADKZjKDk5cyrf8XTKWfrgbtyVVXImFstJrc+1pkQDCggyidIOytq6gS4gCCZg==", + "dev": true, + "requires": { + "chokidar": ">=3.0.0 <4.0.0" + } + }, + "sass-loader": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", + "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "loader-utils": "^1.2.3", + "neo-async": "^2.6.1", + "schema-utils": "^2.6.1", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "sentence-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz", + "integrity": "sha1-H24t2jnBaL+S0T+G1KkYkz9mftQ=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case-first": "^1.1.2" + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "dev": true, + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "dev": true + } + } + }, + "snake-case": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-2.1.0.tgz", + "integrity": "sha1-Qb2xtz8w7GagTU4srRt2OH1NbZ8=", + "dev": true, + "requires": { + "no-case": "^2.2.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "ssri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz", + "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==", + "dev": true, + "requires": { + "figgy-pudding": "^3.5.1" + } + }, + "stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-each": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz", + "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "stream-shift": "^1.0.0" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "stylehacks": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", + "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", + "dev": true, + "requires": { + "browserslist": "^4.0.0", + "postcss": "^7.0.0", + "postcss-selector-parser": "^3.0.0" + }, + "dependencies": { + "postcss-selector-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", + "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "svgo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", + "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "coa": "^2.0.2", + "css-select": "^2.0.0", + "css-select-base-adapter": "^0.1.1", + "css-tree": "1.0.0-alpha.37", + "csso": "^4.0.2", + "js-yaml": "^3.13.1", + "mkdirp": "~0.5.1", + "object.values": "^1.1.0", + "sax": "~1.2.4", + "stable": "^0.1.8", + "unquote": "~1.1.1", + "util.promisify": "~1.0.0" + } + }, + "swap-case": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/swap-case/-/swap-case-1.1.2.tgz", + "integrity": "sha1-w5IDpFhzhfrTyFCgvRvK+ggZdOM=", + "dev": true, + "requires": { + "lower-case": "^1.1.1", + "upper-case": "^1.1.1" + } + }, + "tapable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", + "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", + "dev": true + }, + "terser": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", + "dev": true, + "requires": { + "cacache": "^12.0.2", + "find-cache-dir": "^2.1.0", + "is-wsl": "^1.1.0", + "schema-utils": "^1.0.0", + "serialize-javascript": "^4.0.0", + "source-map": "^0.6.1", + "terser": "^4.1.2", + "webpack-sources": "^1.4.0", + "worker-farm": "^1.7.0" + }, + "dependencies": { + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "timers-browserify": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", + "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "title-case": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz", + "integrity": "sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=", + "dev": true, + "requires": { + "no-case": "^2.2.0", + "upper-case": "^1.0.3" + } + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "uglify-js": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", + "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==" + }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, + "uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "unique-filename": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "dev": true, + "requires": { + "unique-slug": "^2.0.0" + } + }, + "unique-slug": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4" + } + }, + "unquote": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", + "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true, + "optional": true + }, + "upper-case": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", + "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", + "dev": true + }, + "upper-case-first": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-1.1.2.tgz", + "integrity": "sha1-XXm+3P8UQZUY/S7bCgUHybaFkRU=", + "dev": true, + "requires": { + "upper-case": "^1.1.1" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", + "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.2", + "has-symbols": "^1.0.1", + "object.getownpropertydescriptors": "^2.1.0" + } + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "watchpack": { + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz", + "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==", + "dev": true, + "requires": { + "chokidar": "^3.4.1", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0", + "watchpack-chokidar2": "^2.0.1" + } + }, + "watchpack-chokidar2": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz", + "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==", + "dev": true, + "optional": true, + "requires": { + "chokidar": "^2.1.8" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "optional": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "optional": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true, + "optional": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "optional": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "optional": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "optional": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "optional": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "optional": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + } + } + }, + "webpack": { + "version": "4.46.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz", + "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^6.4.1", + "ajv": "^6.10.2", + "ajv-keywords": "^3.4.1", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^4.5.0", + "eslint-scope": "^4.0.3", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^2.4.0", + "loader-utils": "^1.2.3", + "memory-fs": "^0.4.1", + "micromatch": "^3.1.10", + "mkdirp": "^0.5.3", + "neo-async": "^2.6.1", + "node-libs-browser": "^2.2.1", + "schema-utils": "^1.0.0", + "tapable": "^1.1.3", + "terser-webpack-plugin": "^1.4.3", + "watchpack": "^1.7.4", + "webpack-sources": "^1.4.1" + }, + "dependencies": { + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, + "webpack-cli": { + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", + "integrity": "sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "enhanced-resolve": "^4.1.1", + "findup-sync": "^3.0.0", + "global-modules": "^2.0.0", + "import-local": "^2.0.0", + "interpret": "^1.4.0", + "loader-utils": "^1.4.0", + "supports-color": "^6.1.0", + "v8-compile-cache": "^2.1.1", + "yargs": "^13.3.2" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "requires": { + "global-prefix": "^3.0.0" + } + }, + "global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "requires": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "worker-farm": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", + "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==", + "dev": true, + "requires": { + "errno": "~0.1.7" + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/docs/tools/package.json b/docs/tools/package.json new file mode 100644 index 00000000000..b366d562dc3 --- /dev/null +++ b/docs/tools/package.json @@ -0,0 +1,31 @@ +{ + "name": "build", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "build": "NODE_ENV=production webpack --config webpack.config.js", + "watch": "NODE_ENV=development webpack --config webpack.config.js" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@babel/core": "^7.10.2", + "@babel/preset-env": "^7.10.2", + "autoprefixer": "^9.8.0", + "babel-loader": "^8.1.0", + "cssnano": "^4.1.10", + "file-loader": "^6.0.0", + "node-sass-glob-importer": "^5.3.2", + "postcss-loader": "^3.0.0", + "sass": "^1.26.8", + "sass-loader": "^8.0.2", + "webpack": "^4.43.0", + "webpack-cli": "^3.3.11" + }, + "dependencies": { + "amphtml-validator": "^1.0.35", + "bootstrap": "^4.4.1", + "purify-css": "^1.2.5" + } +} diff --git a/docs/tools/release.sh b/docs/tools/release.sh index 035581534f1..a7b51174fdb 100755 --- a/docs/tools/release.sh +++ b/docs/tools/release.sh @@ -4,8 +4,8 @@ set -ex BASE_DIR=$(dirname $(readlink -f $0)) BUILD_DIR="${BASE_DIR}/../build" PUBLISH_DIR="${BASE_DIR}/../publish" -BASE_DOMAIN="${BASE_DOMAIN:-content.clickhouse.tech}" -GIT_TEST_URI="${GIT_TEST_URI:-git@github.com:ClickHouse/clickhouse-website-content.git}" +BASE_DOMAIN="${BASE_DOMAIN:-content.clickhouse.com}" +GIT_TEST_URI="${GIT_TEST_URI:-git@github.com:ClickHouse/clickhouse-com-content.git}" GIT_PROD_URI="git@github.com:ClickHouse/clickhouse-website-content.git" EXTRA_BUILD_ARGS="${EXTRA_BUILD_ARGS:---minify --verbose}" @@ -41,7 +41,7 @@ then then sleep 1m # https://api.cloudflare.com/#zone-purge-files-by-cache-tags,-host-or-prefix - POST_DATA='{"hosts":["content.clickhouse.tech"]}' + POST_DATA='{"hosts":["content.clickhouse.com"]}' curl -X POST "https://api.cloudflare.com/client/v4/zones/4fc6fb1d46e87851605aa7fa69ca6fe0/purge_cache" -H "Authorization: Bearer ${CLOUDFLARE_TOKEN}" -H "Content-Type:application/json" --data "${POST_DATA}" fi fi diff --git a/docs/tools/requirements.txt b/docs/tools/requirements.txt index 9bb4f57e9e2..4e0789b5d24 100644 --- a/docs/tools/requirements.txt +++ b/docs/tools/requirements.txt @@ -12,7 +12,7 @@ htmlmin==0.1.12 idna==2.10 Jinja2>=2.11.3 jinja2-highlight==0.6.1 -jsmin==2.2.2 +jsmin==3.0.0 livereload==2.6.2 Markdown==3.3.2 MarkupSafe==1.1.1 @@ -22,7 +22,7 @@ mkdocs-macros-plugin==0.4.20 nltk==3.5 nose==1.3.7 protobuf==3.14.0 -numpy==1.19.2 +numpy==1.21.2 pymdown-extensions==8.0 python-slugify==4.0.1 PyYAML==5.4.1 diff --git a/docs/tools/single_page.py b/docs/tools/single_page.py index a1e650d3ad3..0e82a1acb87 100644 --- a/docs/tools/single_page.py +++ b/docs/tools/single_page.py @@ -219,10 +219,12 @@ def build_single_page_version(lang, args, nav, cfg): ] logging.info(' '.join(create_pdf_command)) - subprocess.check_call(' '.join(create_pdf_command), shell=True) + try: + subprocess.check_call(' '.join(create_pdf_command), shell=True) + except: + pass # TODO: fix pdf issues logging.info(f'Finished building single page version for {lang}') - + if os.path.exists(single_md_path): os.unlink(single_md_path) - \ No newline at end of file diff --git a/docs/tools/test.py b/docs/tools/test.py index 526294dbe21..53ed9505acd 100755 --- a/docs/tools/test.py +++ b/docs/tools/test.py @@ -8,6 +8,9 @@ import subprocess def test_single_page(input_path, lang): + if not (lang == 'en' or lang == 'ru'): + return + with open(input_path) as f: soup = bs4.BeautifulSoup( f, @@ -33,11 +36,8 @@ def test_single_page(input_path, lang): logging.info('Link to nowhere: %s' % href) if links_to_nowhere: - if lang == 'en' or lang == 'ru': - logging.error(f'Found {links_to_nowhere} links to nowhere in {lang}') - sys.exit(1) - else: - logging.warning(f'Found {links_to_nowhere} links to nowhere in {lang}') + logging.error(f'Found {links_to_nowhere} links to nowhere in {lang}') + sys.exit(1) if len(anchor_points) <= 10: logging.error('Html parsing is probably broken') diff --git a/docs/tools/webpack.config.js b/docs/tools/webpack.config.js new file mode 100644 index 00000000000..e0dea964101 --- /dev/null +++ b/docs/tools/webpack.config.js @@ -0,0 +1,81 @@ +const path = require('path'); +const jsPath = path.resolve(__dirname, '../../website/src/js'); +const scssPath = path.resolve(__dirname, '../../website/src/scss'); + +console.log(path.resolve(__dirname, 'node_modules/bootstrap', require('bootstrap/package.json').sass)); + +module.exports = { + + mode: ('development' === process.env.NODE_ENV) && 'development' || 'production', + + ...(('development' === process.env.NODE_ENV) && { + watch: true, + }), + + entry: [ + path.resolve(scssPath, 'bootstrap.scss'), + path.resolve(scssPath, 'main.scss'), + path.resolve(jsPath, 'main.js'), + ], + + output: { + path: path.resolve(__dirname, '../../website'), + filename: 'js/main.js', + }, + + resolve: { + alias: { + bootstrap: path.resolve(__dirname, 'node_modules/bootstrap', require('bootstrap/package.json').sass), + }, + }, + + module: { + rules: [{ + test: /\.js$/, + exclude: /(node_modules)/, + use: [{ + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env'], + }, + }], + }, { + test: /\.scss$/, + use: [{ + loader: 'file-loader', + options: { + sourceMap: true, + outputPath: (url, entryPath, context) => { + if (0 === entryPath.indexOf(scssPath)) { + const outputFile = entryPath.slice(entryPath.lastIndexOf('/') + 1, -5) + const outputPath = entryPath.slice(0, entryPath.lastIndexOf('/')).slice(scssPath.length + 1) + return `./css/${outputPath}/${outputFile}.css` + } + return `./css/${url}` + }, + }, + }, { + loader: 'postcss-loader', + options: { + options: {}, + plugins: () => ([ + require('autoprefixer'), + ('production' === process.env.NODE_ENV) && require('cssnano'), + ].filter(plugin => plugin)), + } + }, { + loader: 'sass-loader', + options: { + implementation: require('sass'), + implementation: require('sass'), + sourceMap: ('development' === process.env.NODE_ENV), + sassOptions: { + importer: require('node-sass-glob-importer')(), + precision: 10, + }, + }, + }], + }], + }, + +}; diff --git a/docs/tools/website.py b/docs/tools/website.py index f0346de5c94..5e4f48e3441 100644 --- a/docs/tools/website.py +++ b/docs/tools/website.py @@ -104,7 +104,7 @@ def adjust_markdown_html(content): for p in div.find_all('p'): p_class = p.attrs.get('class') if is_admonition and p_class and ('admonition-title' in p_class): - p.attrs['class'] = p_class + ['alert-heading', 'display-6', 'mb-2'] + p.attrs['class'] = p_class + ['alert-heading', 'display-4', 'text-reset', 'mb-2'] if is_admonition: div.attrs['role'] = 'alert' @@ -144,6 +144,7 @@ def build_website(args): 'docs', 'public', 'node_modules', + 'src', 'templates', 'locale', '.gitkeep' @@ -181,7 +182,8 @@ def get_css_in(args): f"'{args.website_dir}/css/base.css'", f"'{args.website_dir}/css/blog.css'", f"'{args.website_dir}/css/docs.css'", - f"'{args.website_dir}/css/highlight.css'" + f"'{args.website_dir}/css/highlight.css'", + f"'{args.website_dir}/css/main.css'" ] @@ -194,7 +196,8 @@ def get_js_in(args): f"'{args.website_dir}/js/base.js'", f"'{args.website_dir}/js/index.js'", f"'{args.website_dir}/js/docsearch.js'", - f"'{args.website_dir}/js/docs.js'" + f"'{args.website_dir}/js/docs.js'", + f"'{args.website_dir}/js/main.js'" ] @@ -212,10 +215,12 @@ def minify_file(path, css_digest, js_digest): content = minify_html(content) content = content.replace('base.css?css_digest', f'base.css?{css_digest}') content = content.replace('base.js?js_digest', f'base.js?{js_digest}') - elif path.endswith('.css'): - content = cssmin.cssmin(content) - elif path.endswith('.js'): - content = jsmin.jsmin(content) +# TODO: restore cssmin +# elif path.endswith('.css'): +# content = cssmin.cssmin(content) +# TODO: restore jsmin +# elif path.endswith('.js'): +# content = jsmin.jsmin(content) with open(path, 'wb') as f: f.write(content.encode('utf-8')) @@ -237,7 +242,7 @@ def minify_website(args): js_in = get_js_in(args) js_out = f'{args.output_dir}/js/base.js' - if args.minify: + if args.minify and False: # TODO: return closure js_in = [js[1:-1] for js in js_in] closure_args = [ '--js', *js_in, '--js_output_file', js_out, diff --git a/docs/zh/changelog/index.md b/docs/zh/changelog/index.md index 14bed16c381..d36a676134e 100644 --- a/docs/zh/changelog/index.md +++ b/docs/zh/changelog/index.md @@ -247,7 +247,7 @@ toc_title: "\u53D8\u66F4\u65E5\u5FD7" - 更新了clickhouse-test脚本中挂起查询的检查 [#8858](https://github.com/ClickHouse/ClickHouse/pull/8858) ([亚历山大\*卡扎科夫](https://github.com/Akazz)) - 从存储库中删除了一些无用的文件。 [#8843](https://github.com/ClickHouse/ClickHouse/pull/8843) ([阿列克谢-米洛维多夫](https://github.com/alexey-milovidov)) - 更改类型的数学perftests从 `once` 到 `loop`. [#8783](https://github.com/ClickHouse/ClickHouse/pull/8783) ([尼古拉\*科切托夫](https://github.com/KochetovNicolai)) -- 添加码头镜像,它允许为我们的代码库构建交互式代码浏览器HTML报告。 [#8781](https://github.com/ClickHouse/ClickHouse/pull/8781) ([阿利沙平](https://github.com/alesapin))见 [Woboq代码浏览器](https://clickhouse.tech/codebrowser/html_report///ClickHouse/dbms/index.html) +- 添加码头镜像,它允许为我们的代码库构建交互式代码浏览器HTML报告。 [#8781](https://github.com/ClickHouse/ClickHouse/pull/8781) ([阿利沙平](https://github.com/alesapin))见 [Woboq代码浏览器](https://clickhouse.com/codebrowser/html_report///ClickHouse/dbms/index.html) - 抑制MSan下的一些测试失败。 [#8780](https://github.com/ClickHouse/ClickHouse/pull/8780) ([Alexander Kuzmenkov](https://github.com/akuzm)) - 加速 “exception while insert” 测试 此测试通常在具有复盖率的调试版本中超时。 [#8711](https://github.com/ClickHouse/ClickHouse/pull/8711) ([阿列克谢-米洛维多夫](https://github.com/alexey-milovidov)) - 更新 `libcxx` 和 `libcxxabi` 为了主人 在准备 [#9304](https://github.com/ClickHouse/ClickHouse/issues/9304) [#9308](https://github.com/ClickHouse/ClickHouse/pull/9308) ([阿列克谢-米洛维多夫](https://github.com/alexey-milovidov)) diff --git a/docs/zh/commercial/cloud.md b/docs/zh/commercial/cloud.md index 651a1a15ec4..61a4f638bbc 100644 --- a/docs/zh/commercial/cloud.md +++ b/docs/zh/commercial/cloud.md @@ -5,49 +5,7 @@ toc_title: 云 # ClickHouse 云服务提供商 {#clickhouse-cloud-service-providers} -!!! info "注意" - 如果您已经推出具有托管 ClickHouse 服务的公共云,请随时[提交一个 pull request](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/cloud.md) 将其添加到以下列表。 +# ClickHouse Cloud Service {#clickhouse-cloud-service} -## Yandex 云 {#yandex-cloud} - -[Yandex的 ClickHouse 托管服务](https://cloud.yandex.com/services/managed-clickhouse?utm_source=referrals&utm_medium=clickhouseofficialsite&utm_campaign=link3) 提供以下主要功能: - -- 用于 ClickHouse 复制的完全托管的 ZooKeeper 服务 [ClickHouse复制](../engines/table-engines/mergetree-family/replication.md) -- 多种存储类型选择 -- 不同可用区副本 -- 加密与隔离 -- 自动化维护 - -## Altinity.Cloud {#altinity.cloud} - -[Altinity.Cloud](https://altinity.com/cloud-database/) 是针对 Amazon 公共云的完全托管的 ClickHouse-as-a-Service - -- 在 Amazon 资源上快速部署 ClickHouse 集群 -- 轻松进行横向扩展/纵向扩展以及节点的垂直扩展 -- 具有公共端点或VPC对等的租户隔离 -- 可配置存储类型以及卷配置 -- 跨可用区扩展以实现性能和高可用性 -- 内置监控和SQL查询编辑器 - -## 阿里云 {#alibaba-cloud} - -[阿里云的 ClickHouse 托管服务](https://www.alibabacloud.com/zh/product/clickhouse) 提供以下主要功能: - -- 基于阿里飞天分布式系统的高可靠云盘存储引擎 -- 按需扩容,无需手动进行数据搬迁 -- 支持单节点、单副本、多节点、多副本多种架构,支持冷热数据分层 -- 支持访问白名单和一键恢复,多层网络安全防护,云盘加密 -- 与云上日志系统、数据库、数据应用工具无缝集成 -- 内置监控和数据库管理平台 -- 专业的数据库专家技术支持和服务 - -## 腾讯云 {#tencent-cloud} - -[腾讯云的 ClickHouse 托管服务](https://cloud.tencent.com/product/cdwch)提供以下主要功能: - -- 易于部署和管理, 集成监控与警报服务 -- 高可用高扩展 -- 通过集群级别的 VPC 保证安全可靠 -- 按需定价,无需前期成本或长期承诺 - -{## [原始文章](https://clickhouse.tech/docs/en/commercial/cloud/) ##} +!!! info "Info" + Detailed public description for ClickHouse cloud services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/zh/commercial/index.md b/docs/zh/commercial/index.md index 047ee817d7b..5f29e5f21c9 100644 --- a/docs/zh/commercial/index.md +++ b/docs/zh/commercial/index.md @@ -6,12 +6,7 @@ toc_title: 简介 # ClickHouse 商业服务 {#clickhouse-commercial-services} -本节是专门从事 ClickHouse 的服务提供商的目录,它们是一些独立的公司,不一定与 Yandex 有关系。 - 服务类别: - [云](../commercial/cloud.md) - [支持](../commercial/support.md) - -!!! note "对于服务提供商" -如果您碰巧是其中之一,可以随时提交一个 pull request,将您的公司添加到对应的章节(如果服务不属于现有的任何目录,也可以添加新的章节)。提交关于文档的 pull request 最简单的方式是点击右上角的“铅笔”编辑按钮。如果您的服务在某些本地市场上有售,请确保在本地化的文档界面中也提及它(或至少在 pull request 请求描述中指出)。 diff --git a/docs/zh/commercial/support.md b/docs/zh/commercial/support.md index 44b6d1eab8d..a3714c98d44 100644 --- a/docs/zh/commercial/support.md +++ b/docs/zh/commercial/support.md @@ -5,17 +5,5 @@ toc_title: 支持 # ClickHouse 商业支持服务提供商 {#clickhouse-commercial-support-service-providers} -!!! info "注意" - 如果您已经推出 ClickHouse 商业支持服务,请随时[提交一个 pull request](https://github.com/ClickHouse/ClickHouse/edit/master/docs/en/commercial/support.md) 将其添加到以下列表。 - -## Altinity {#altinity} - - Altinity 自从 2017 年开始为企业提供 ClickHouse 支持服务。Altinity 的客户范围包含百强企业到初创企业等。访问 [www.altinity.com](https://www.altinity.com/) 了解更多信息。 - -## Mafiree {#mafiree} - -[服务说明](http://mafiree.com/clickhouse-analytics-services.php) - -## MinervaDB {#minervadb} - -[服务说明](https://minervadb.com/index.php/clickhouse-consulting-and-support-by-minervadb/) +!!! info "Info" + Detailed public description for ClickHouse support services is not ready yet, please [contact us](https://clickhouse.com/company/#contact) to learn more. diff --git a/docs/zh/development/adding_test_queries.md b/docs/zh/development/adding_test_queries.md new file mode 100644 index 00000000000..a494bb5eb44 --- /dev/null +++ b/docs/zh/development/adding_test_queries.md @@ -0,0 +1,150 @@ +# 如何将测试查询添加到 ClickHouse CI + +ClickHouse有数百个(甚至数千个)功能。 每个提交都由包含数千个测试用例的一组复杂测试进行检查。 + +核心功能经过了很多的测试,但是ClickHouse CI可以发现一些极端情况和不同的功能组合。 + +我们看到的大多数错误/回归都发生在测试覆盖率较差的`灰色区域`中。 + +我们非常有兴趣通过测试涵盖实现生活中使用的大多数可能的场景和功能组合。 + +## 为什么要添加测试 + +为什么/何时应将测试用例添加到ClickHouse代码中: +1) 您使用了一些复杂的场景/功能组合/您有一些可能未被广泛使用的情况 +2) 您会看到更改日志中没有通知的版本之间的某些行为发生了变化 +3) 您只是想帮助提高ClickHouse的质量并确保您使用的功能在未来的版本中不会被破坏 +4) 一旦测试被添加/接受,您可以确保您检查的角落案例永远不会被意外损坏。 +5) 你将成为伟大的开源社区的一份子 +6) 您的名字将出现在`system.contributors`表中! +7) 你会让世界变得更好。 + +### 要做的步骤 + +#### 先决条件 + +我假设你运行一些Linux机器(你可以在其他操作系统上使用 docker/虚拟机)和任何现代浏览器/互联网连接,并且你有一些基本的Linux和SQL技能。 + +不需要任何高度专业化的知识(因此您不需要了解 C++ 或了解ClickHouse CI的工作原理)。 + +#### 准备 + +1) [create GitHub account](https://github.com/join) (如果你还没有) +2) [setup git](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/set-up-git) +```bash +# for Ubuntu +sudo apt-get update +sudo apt-get install git + +git config --global user.name "John Doe" # fill with your name +git config --global user.email "email@example.com" # fill with your email + +``` +3) [fork ClickHouse project](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) - 打开 [https://github.com/ClickHouse/ClickHouse](https://github.com/ClickHouse/ClickHouse) and press fork button in the top right corner: + ![fork repo](https://github-images.s3.amazonaws.com/help/bootcamp/Bootcamp-Fork.png) + +4) 例如,将代码fork克隆到PC上的某个文件夹, `~/workspace/ClickHouse` +``` +mkdir ~/workspace && cd ~/workspace +git clone https://github.com/< your GitHub username>/ClickHouse +cd ClickHouse +git remote add upstream https://github.com/ClickHouse/ClickHouse +``` + +#### 测试的新分支 + +1) 从最新的clickhouse master创建一个新分支 +``` +cd ~/workspace/ClickHouse +git fetch upstream +git checkout -b name_for_a_branch_with_my_test upstream/master +``` + +#### 安装并运行 clickhouse + +1) 安装`clickhouse-server` (参考[离线文档](https://clickhouse.com/docs/en/getting-started/install/)) +2) 安装测试配置(它将使用Zookeeper模拟实现并调整一些设置) +``` +cd ~/workspace/ClickHouse/tests/config +sudo ./install.sh +``` +3) 运行clickhouse-server +``` +sudo systemctl restart clickhouse-server +``` + +#### 创建测试文件 + + +1) 找到测试的编号 - 在`tests/queries/0_stateless/`中找到编号最大的文件 + +```sh +$ cd ~/workspace/ClickHouse +$ ls tests/queries/0_stateless/[0-9]*.reference | tail -n 1 +tests/queries/0_stateless/01520_client_print_query_id.reference +``` +目前,测试的最后一个数字是`01520`,所以我的测试将有数字`01521` + +2) 使用您测试的功能的下一个编号和名称创建一个SQL文件 + +```sh +touch tests/queries/0_stateless/01521_dummy_test.sql +``` + +3) 使用您最喜欢的编辑器编辑SQL文件(请参阅下面的创建测试提示) +```sh +vim tests/queries/0_stateless/01521_dummy_test.sql +``` + + +4) 运行测试,并将其结果放入参考文件中: +``` +clickhouse-client -nmT < tests/queries/0_stateless/01521_dummy_test.sql | tee tests/queries/0_stateless/01521_dummy_test.reference +``` + +5) 确保一切正确,如果测试输出不正确(例如由于某些错误),请使用文本编辑器调整参考文件。 + +#### 如何创建一个好的测试 + +- 测试应该是 + - 最小 - 仅创建与测试功能相关的表,删除不相关的列和部分查询 + - 快速 - 不应超过几秒钟(更好的亚秒) + - 正确 - 失败则功能不起作用 + - 确定性的 + - 隔离/无状态 + - 不要依赖一些环境的东西 + - 尽可能不要依赖时间 +- 尝试覆盖极端情况(zeros / Nulls / empty sets / throwing exceptions) +- 要测试该查询返回错误,您可以在查询后添加特殊注释:`-- { serverError 60 }`或`-- { clientError 20 }` +- 不要切换数据库(除非必要) +- 如果需要,您可以在同一节点上创建多个表副本 +- 您可以在需要时使用测试集群定义之一(请参阅 system.clusters) +- 使用 `number` / `numbers_mt` / `zeros` / `zeros_mt`和类似的查询要在适用时初始化数据 +- 在测试之后和测试之前清理创建的对象(DROP IF EXISTS) - 在有一些脏状态的情况下 +- 优先选择同步操作模式 (mutations, merges) +- 以`0_stateless`文件夹中的其他SQL文件为例 +- 确保您想要测试的特性/特性组合尚未被现有测试覆盖 + +#### 测试命名规则 + +正确地命名测试非常重要,因此可以在clickhouse-test调用中关闭一些测试子集。 + +| Tester flag| 测试名称中应该包含什么 | 什么时候应该添加标志 | +|---|---|---|---| +| `--[no-]zookeeper`| "zookeeper"或"replica" | 测试使用来自ReplicatedMergeTree家族的表 | +| `--[no-]shard` | "shard"或"distributed"或"global"| 使用到127.0.0.2或类似的连接进行测试 | +| `--[no-]long` | "long"或"deadlock"或"race" | 测试运行时间超过60秒 | + +#### Commit / push / 创建PR. + +1) commit & push您的修改 +```sh +cd ~/workspace/ClickHouse +git add tests/queries/0_stateless/01521_dummy_test.sql +git add tests/queries/0_stateless/01521_dummy_test.reference +git commit # use some nice commit message when possible +git push origin HEAD +``` +2) 使用一个在推送过程中显示的链接,创建一个到master的PR +3) 调整PR标题和内容,在`Changelog category (leave one)`中保留 + `Build/Testing/Packaging Improvement`,如果需要,请填写其余字段。 diff --git a/docs/zh/development/architecture.md b/docs/zh/development/architecture.md index 882728a6e2b..dfc66b36730 100644 --- a/docs/zh/development/architecture.md +++ b/docs/zh/development/architecture.md @@ -191,4 +191,4 @@ ClickHouse 中的复制是基于表实现的。你可以在同一个服务器上 > ClickHouse 集群由独立的分片组成,每一个分片由多个副本组成。集群不是弹性的,因此在添加新的分片后,数据不会自动在分片之间重新平衡。相反,集群负载将变得不均衡。该实现为你提供了更多控制,对于相对较小的集群,例如只有数十个节点的集群来说是很好的。但是对于我们在生产中使用的具有数百个节点的集群来说,这种方法成为一个重大缺陷。我们应该实现一个表引擎,使得该引擎能够跨集群扩展数据,同时具有动态复制的区域,这些区域能够在集群之间自动拆分和平衡。 -[来源文章](https://clickhouse.tech/docs/en/development/architecture/) +[来源文章](https://clickhouse.com/docs/en/development/architecture/) diff --git a/docs/zh/development/browse-code.md b/docs/zh/development/browse-code.md index fd334dac55f..9cee0a37444 100644 --- a/docs/zh/development/browse-code.md +++ b/docs/zh/development/browse-code.md @@ -5,7 +5,7 @@ toc_title: "\u6D4F\u89C8\u6E90\u4EE3\u7801" # 浏览ClickHouse源代码 {#browse-clickhouse-source-code} -您可以使用 **Woboq** 在线代码浏览器 [点击这里](https://clickhouse.tech/codebrowser/html_report/ClickHouse/src/index.html). 它提供了代码导航和语义突出显示、搜索和索引。 代码快照每天更新。 +您可以使用 **Woboq** 在线代码浏览器 [点击这里](https://clickhouse.com/codebrowser/html_report/ClickHouse/src/index.html). 它提供了代码导航和语义突出显示、搜索和索引。 代码快照每天更新。 此外,您还可以像往常一样浏览源代码 [GitHub](https://github.com/ClickHouse/ClickHouse) diff --git a/docs/zh/development/build-cross-arm.md b/docs/zh/development/build-cross-arm.md index fa6c9e74b5f..5c70fa9c7dd 100644 --- a/docs/zh/development/build-cross-arm.md +++ b/docs/zh/development/build-cross-arm.md @@ -10,7 +10,7 @@ toc_title: "\u5982\u4F55\u5728Linux\u4E0A\u6784\u5EFAClickHouse for AARCH64\uFF0 这是当你有Linux机器,并希望使用它来构建的情况下 `clickhouse` 二进制文件将运行在另一个Linux机器上与AARCH64CPU架构。 这适用于在Linux服务器上运行的持续集成检查。 -Aarch64的交叉构建基于 [构建说明](build.md) 先跟着他们 +Aarch64的交叉构建基于 [构建说明](../development/build.md) 先跟着他们 # 安装Clang-8 {#install-clang-8} diff --git a/docs/zh/development/build-cross-osx.md b/docs/zh/development/build-cross-osx.md index ee3335553d3..d9bc7666546 100644 --- a/docs/zh/development/build-cross-osx.md +++ b/docs/zh/development/build-cross-osx.md @@ -1,6 +1,6 @@ # 如何在Linux中编译Mac OS X ClickHouse {#ru-he-zai-linuxzhong-bian-yi-mac-os-x-clickhouse} -Linux机器也可以编译运行在OS X系统的`clickhouse`二进制包,这可以用于在Linux上跑持续集成测试。如果要在Mac OS X上直接构建ClickHouse,请参考另外一篇指南: https://clickhouse.tech/docs/zh/development/build_osx/ +Linux机器也可以编译运行在OS X系统的`clickhouse`二进制包,这可以用于在Linux上跑持续集成测试。如果要在Mac OS X上直接构建ClickHouse,请参考另外一篇指南: https://clickhouse.com/docs/zh/development/build_osx/ Mac OS X的交叉编译基于以下构建说明,请首先遵循它们。 diff --git a/docs/zh/development/build-osx.md b/docs/zh/development/build-osx.md index c7c386da97e..6706e9b0e4d 100644 --- a/docs/zh/development/build-osx.md +++ b/docs/zh/development/build-osx.md @@ -79,4 +79,4 @@ $ sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist 可以通过 `ulimit -n` 命令来检查是否生效。 -[来源文章](https://clickhouse.tech/docs/en/development/build_osx/) +[来源文章](https://clickhouse.com/docs/en/development/build_osx/) diff --git a/docs/zh/development/build.md b/docs/zh/development/build.md index 01e0740bfa4..a46081d1d4b 100644 --- a/docs/zh/development/build.md +++ b/docs/zh/development/build.md @@ -65,4 +65,4 @@ cd .. 若要创建一个执行文件, 执行 `ninja clickhouse`。 这个命令会使得 `programs/clickhouse` 文件可执行,您可以使用 `client` 或 `server` 参数运行。 -[来源文章](https://clickhouse.tech/docs/en/development/build/) +[来源文章](https://clickhouse.com/docs/en/development/build/) diff --git a/docs/zh/development/continuous-integration.md b/docs/zh/development/continuous-integration.md new file mode 120000 index 00000000000..f68058a436e --- /dev/null +++ b/docs/zh/development/continuous-integration.md @@ -0,0 +1 @@ +../../en/development/continuous-integration.md \ No newline at end of file diff --git a/docs/zh/development/developer-instruction.md b/docs/zh/development/developer-instruction.md index 04950c11521..e37533fb36b 100644 --- a/docs/zh/development/developer-instruction.md +++ b/docs/zh/development/developer-instruction.md @@ -224,11 +224,11 @@ KDevelop和QTCreator是另外两款适合开发ClickHouse的替代IDE。尽管 # 编写代码 {#bian-xie-dai-ma} -ClickHouse的架构描述可以在此处查看:https://clickhouse.tech/docs/en/development/architecture/ +ClickHouse的架构描述可以在此处查看:https://clickhouse.com/docs/en/development/architecture/ -代码风格指引:https://clickhouse.tech/docs/en/development/style/ +代码风格指引:https://clickhouse.com/docs/en/development/style/ -编写测试用例:https://clickhouse.tech/docs/en/development/tests/ +编写测试用例:https://clickhouse.com/docs/en/development/tests/ 任务列表:https://github.com/ClickHouse/ClickHouse/issues?q=is%3Aopen+is%3Aissue+label%3A%22easy+task%22 @@ -238,8 +238,8 @@ ClickHouse的架构描述可以在此处查看:https://clickhouse.tech/docs/en sudo apt install wget xz-utils - wget https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz - wget https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz + wget https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz + wget https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz xz -v -d hits_v1.tsv.xz xz -v -d visits_v1.tsv.xz diff --git a/docs/zh/development/index.md b/docs/zh/development/index.md index 187ee1b3e25..d14b0fc8fc7 100644 --- a/docs/zh/development/index.md +++ b/docs/zh/development/index.md @@ -1,3 +1,3 @@ # ClickHouse 开发 {#clickhouse-kai-fa} -[来源文章](https://clickhouse.tech/docs/en/development/) +[来源文章](https://clickhouse.com/docs/en/development/) diff --git a/docs/zh/development/style.md b/docs/zh/development/style.md index dcbfbc79e33..29287f31077 100644 --- a/docs/zh/development/style.md +++ b/docs/zh/development/style.md @@ -823,4 +823,4 @@ function( size_t limit) ``` -[来源文章](https://clickhouse.tech/docs/en/development/style/) +[来源文章](https://clickhouse.com/docs/en/development/style/) diff --git a/docs/zh/development/tests.md b/docs/zh/development/tests.md new file mode 120000 index 00000000000..c03d36c3916 --- /dev/null +++ b/docs/zh/development/tests.md @@ -0,0 +1 @@ +../../en/development/tests.md \ No newline at end of file diff --git a/docs/zh/engines/database-engines/atomic.md b/docs/zh/engines/database-engines/atomic.md index 73e044b5e98..018cb9971ae 100644 --- a/docs/zh/engines/database-engines/atomic.md +++ b/docs/zh/engines/database-engines/atomic.md @@ -3,15 +3,55 @@ toc_priority: 32 toc_title: Atomic --- - # Atomic {#atomic} -它支持非阻塞 DROP 和 RENAME TABLE 查询以及原子 EXCHANGE TABLES t1 AND t2 查询。默认情况下使用Atomic数据库引擎。 +它支持非阻塞的[DROP TABLE](#drop-detach-table)和[RENAME TABLE](#rename-table)查询和原子的[EXCHANGE TABLES t1 AND t2](#exchange-tables)查询。默认情况下使用`Atomic`数据库引擎。 ## 创建数据库 {#creating-a-database} -```sql -CREATE DATABASE test ENGINE = Atomic; +``` sql + CREATE DATABASE test[ ENGINE = Atomic]; ``` -[原文](https://clickhouse.tech/docs/en/engines/database_engines/atomic/) +## 使用方式 {#specifics-and-recommendations} + +### Table UUID {#table-uuid} + +数据库`Atomic`中的所有表都有唯一的[UUID](../../sql-reference/data-types/uuid.md),并将数据存储在目录`/clickhouse_path/store/xxx/xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy/`,其中`xxxyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy`是该表的UUID。 + +通常,UUID是自动生成的,但用户也可以在创建表时以相同的方式显式指定UUID(不建议这样做)。可以使用 [show_table_uuid_in_table_create_query_if_not_nil](../../operations/settings/settings.md#show_table_uuid_in_table_create_query_if_not_nil)设置。显示UUID的使用`SHOW CREATE`查询。例如: + +```sql +CREATE TABLE name UUID '28f1c61c-2970-457a-bffe-454156ddcfef' (n UInt64) ENGINE = ...; +``` + +### RENAME TABLES {#rename-table} + +`RENAME`查询是在不更改UUID和移动表数据的情况下执行的。这些查询不会等待使用表的查询完成,而是会立即执行。 + +### DROP/DETACH TABLES {#drop-detach-table} + +在`DROP TABLE`上,不删除任何数据,数据库`Atomic`只是通过将元数据移动到`/clickhouse_path/metadata_dropped/`将表标记为已删除,并通知后台线程。最终表数据删除前的延迟由[database_atomic_delay_before_drop_table_sec](../../operations/server-configuration-parameters/settings.md#database_atomic_delay_before_drop_table_sec)设置指定。 + +可以使用`SYNC`修饰符指定同步模式。使用[database_atomic_wait_for_drop_and_detach_synchronously](../../operations/settings/settings.md#database_atomic_wait_for_drop_and_detach_synchronously)设置执行此操作。在本例中,`DROP`等待运行 `SELECT`, `INSERT`和其他使用表完成的查询。表在不使用时将被实际删除。 + +### EXCHANGE TABLES {#exchange-tables} + +`EXCHANGE`以原子方式交换表。因此,不是这种非原子操作: + +```sql +RENAME TABLE new_table TO tmp, old_table TO new_table, tmp TO old_table; +``` +可以使用一个原子查询: + +``` sql +EXCHANGE TABLES new_table AND old_table; +``` + +### ReplicatedMergeTree in Atomic Database {#replicatedmergetree-in-atomic-database} + +对于[ReplicatedMergeTree](../table-engines/mergetree-family/replication.md#table_engines-replication)表,建议不要在ZooKeeper和副本名称中指定engine-path的参数。在这种情况下,将使用配置的参数[default_replica_path](../../operations/server-configuration-parameters/settings.md#default_replica_path)和[default_replica_name](../../operations/server-configuration-parameters/settings.md#default_replica_name)。如果要显式指定引擎的参数,建议使用{uuid}宏。这是非常有用的,以便为ZooKeeper中的每个表自动生成唯一的路径。 + +## 另请参考 + +- [system.databases](../../operations/system-tables/databases.md) 系统表 diff --git a/docs/zh/engines/database-engines/index.md b/docs/zh/engines/database-engines/index.md index 25c9ff6c6bc..10be2e0f041 100644 --- a/docs/zh/engines/database-engines/index.md +++ b/docs/zh/engines/database-engines/index.md @@ -1,11 +1,29 @@ -# 数据库引擎 {#shu-ju-ku-yin-qing} +--- +toc_folder_title: 数据库引擎 +toc_priority: 27 +toc_title: Introduction +--- -您使用的所有表都是由数据库引擎所提供的 +# 数据库引擎 {#database-engines} -默认情况下,ClickHouse使用自己的数据库引擎,该引擎提供可配置的[表引擎](../../engines/database-engines/index.md)和[所有支持的SQL语法](../../engines/database-engines/index.md). +数据库引擎允许您处理数据表。 -除此之外,您还可以选择使用以下的数据库引擎: +默认情况下,ClickHouse使用[Atomic](../../engines/database-engines/atomic.md)数据库引擎。它提供了可配置的[table engines](../../engines/table-engines/index.md)和[SQL dialect](../../sql-reference/syntax.md)。 -- [MySQL](mysql.md) +您还可以使用以下数据库引擎: -[来源文章](https://clickhouse.tech/docs/en/database_engines/) +- [MySQL](../../engines/database-engines/mysql.md) + +- [MaterializeMySQL](../../engines/database-engines/materialize-mysql.md) + +- [Lazy](../../engines/database-engines/lazy.md) + +- [Atomic](../../engines/database-engines/atomic.md) + +- [PostgreSQL](../../engines/database-engines/postgresql.md) + +- [MaterializedPostgreSQL](../../engines/database-engines/materialized-postgresql.md) + +- [Replicated](../../engines/database-engines/replicated.md) + +[来源文章](https://clickhouse.com/docs/en/database_engines/) diff --git a/docs/zh/engines/database-engines/lazy.md b/docs/zh/engines/database-engines/lazy.md index bca7eaeda6c..f5aa3174a24 100644 --- a/docs/zh/engines/database-engines/lazy.md +++ b/docs/zh/engines/database-engines/lazy.md @@ -1,16 +1,18 @@ --- toc_priority: 31 -toc_title: "延时引擎" +toc_title: Lazy --- -# 延时引擎Lazy {#lazy} +# Lazy {#lazy} -在距最近一次访问间隔`expiration_time_in_seconds`时间段内,将表保存在内存中,仅适用于 \*Log引擎表 +在最后一次访问之后,只在RAM中保存`expiration_time_in_seconds`秒。只能用于\*Log表。 -由于针对这类表的访问间隔较长,对保存大量小的 \*Log引擎表进行了优化, +它是为存储许多小的\*Log表而优化的,对于这些表,访问之间有很长的时间间隔。 ## 创建数据库 {#creating-a-database} - CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds); +``` sql +CREATE DATABASE testlazy ENGINE = Lazy(expiration_time_in_seconds); +``` -[原始文章](https://clickhouse.tech/docs/en/database_engines/lazy/) +[来源文章](https://clickhouse.com/docs/en/database_engines/lazy/) diff --git a/docs/zh/engines/database-engines/materialize-mysql.md b/docs/zh/engines/database-engines/materialize-mysql.md new file mode 100644 index 00000000000..1a6bd029295 --- /dev/null +++ b/docs/zh/engines/database-engines/materialize-mysql.md @@ -0,0 +1,197 @@ +--- +toc_priority: 29 +toc_title: "[experimental] MaterializedMySQL" +--- + +# [experimental] MaterializedMySQL {#materialized-mysql} + +**这是一个实验性的特性,不应该在生产中使用。** + +创建ClickHouse数据库,包含MySQL中所有的表,以及这些表中的所有数据。 + +ClickHouse服务器作为MySQL副本工作。它读取binlog并执行DDL和DML查询。 + +这个功能是实验性的。 + +## 创建数据库 {#creating-a-database} + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] +ENGINE = MaterializeMySQL('host:port', ['database' | database], 'user', 'password') [SETTINGS ...] +``` + +**引擎参数** + +- `host:port` — MySQL服务地址 +- `database` — MySQL数据库名称 +- `user` — MySQL用户名 +- `password` — MySQL用户密码 + +**引擎配置** + +- `max_rows_in_buffer` — 允许数据缓存到内存中的最大行数(对于单个表和无法查询的缓存数据)。当超过行数时,数据将被物化。默认值: `65505`。 +- `max_bytes_in_buffer` — 允许在内存中缓存数据的最大字节数(对于单个表和无法查询的缓存数据)。当超过行数时,数据将被物化。默认值: `1048576`. +- `max_rows_in_buffers` — 允许数据缓存到内存中的最大行数(对于数据库和无法查询的缓存数据)。当超过行数时,数据将被物化。默认值: `65505`. +- `max_bytes_in_buffers` — 允许在内存中缓存数据的最大字节数(对于数据库和无法查询的缓存数据)。当超过行数时,数据将被物化。默认值: `1048576`. +- `max_flush_data_time` — 允许数据在内存中缓存的最大毫秒数(对于数据库和无法查询的缓存数据)。当超过这个时间时,数据将被物化。默认值: `1000`. +- `max_wait_time_when_mysql_unavailable` — 当MySQL不可用时重试间隔(毫秒)。负值禁止重试。默认值: `1000`. +- `allows_query_when_mysql_lost` — 当mysql丢失时,允许查询物化表。默认值: `0` (`false`). +``` +CREATE DATABASE mysql ENGINE = MaterializeMySQL('localhost:3306', 'db', 'user', '***') + SETTINGS + allows_query_when_mysql_lost=true, + max_wait_time_when_mysql_unavailable=10000; +``` + +**MySQL服务器端配置** + +为了`MaterializeMySQL`正确的工作,有一些强制性的`MySQL`侧配置设置应该设置: + +- `default_authentication_plugin = mysql_native_password`,因为`MaterializeMySQL`只能使用此方法授权。 +- `gtid_mode = on`,因为要提供正确的`MaterializeMySQL`复制,基于GTID的日志记录是必须的。注意,在打开这个模式`On`时,你还应该指定`enforce_gtid_consistency = on`。 + +## 虚拟列 {#virtual-columns} + +当使用`MaterializeMySQL`数据库引擎时,[ReplacingMergeTree](../../engines/table-engines/mergetree-family/replacingmergetree.md)表与虚拟的`_sign`和`_version`列一起使用。 + +- `_version` — 同步版本。 类型[UInt64](../../sql-reference/data-types/int-uint.md). +- `_sign` — 删除标记。类型 [Int8](../../sql-reference/data-types/int-uint.md). Possible values: + - `1` — 行不会删除, + - `-1` — 行被删除。 + +## 支持的数据类型 {#data_types-support} + +| MySQL | ClickHouse | +|-------------------------|--------------------------------------------------------------| +| TINY | [Int8](../../sql-reference/data-types/int-uint.md) | +| SHORT | [Int16](../../sql-reference/data-types/int-uint.md) | +| INT24 | [Int32](../../sql-reference/data-types/int-uint.md) | +| LONG | [UInt32](../../sql-reference/data-types/int-uint.md) | +| LONGLONG | [UInt64](../../sql-reference/data-types/int-uint.md) | +| FLOAT | [Float32](../../sql-reference/data-types/float.md) | +| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | +| DECIMAL, NEWDECIMAL | [Decimal](../../sql-reference/data-types/decimal.md) | +| DATE, NEWDATE | [Date](../../sql-reference/data-types/date.md) | +| DATETIME, TIMESTAMP | [DateTime](../../sql-reference/data-types/datetime.md) | +| DATETIME2, TIMESTAMP2 | [DateTime64](../../sql-reference/data-types/datetime64.md) | +| ENUM | [Enum](../../sql-reference/data-types/enum.md) | +| STRING | [String](../../sql-reference/data-types/string.md) | +| VARCHAR, VAR_STRING | [String](../../sql-reference/data-types/string.md) | +| BLOB | [String](../../sql-reference/data-types/string.md) | +| BINARY | [FixedString](../../sql-reference/data-types/fixedstring.md) | + +不支持其他类型。如果MySQL表包含此类类型的列,ClickHouse抛出异常"Unhandled data type"并停止复制。 + +[Nullable](../../sql-reference/data-types/nullable.md)已经支持 + +## 使用方式 {#specifics-and-recommendations} + +### 兼容性限制 + +除了数据类型的限制外,与`MySQL`数据库相比,还存在一些限制,在实现复制之前应先解决这些限制: + +- `MySQL`中的每个表都应该包含`PRIMARY KEY` + +- 对于包含`ENUM`字段值超出范围(在`ENUM`签名中指定)的行的表,复制将不起作用。 + +### DDL查询 {#ddl-queries} + +MySQL DDL查询转换为相应的ClickHouse DDL查询([ALTER](../../sql-reference/statements/alter/index.md), [CREATE](../../sql-reference/statements/create/index.md), [DROP](../../sql-reference/statements/drop.md), [RENAME](../../sql-reference/statements/rename.md))。如果ClickHouse无法解析某个DDL查询,则该查询将被忽略。 + +### Data Replication {#data-replication} + +`MaterializeMySQL`不支持直接`INSERT`, `DELETE`和`UPDATE`查询. 但是,它们是在数据复制方面支持的: + +- MySQL的`INSERT`查询转换为`INSERT`并携带`_sign=1`. + +- MySQL的`DELETE`查询转换为`INSERT`并携带`_sign=-1`. + +- MySQL的`UPDATE`查询转换为`INSERT`并携带`_sign=-1`, `INSERT`和`_sign=1`. + +### 查询MaterializeMySQL表 {#select} + +`SELECT`查询`MaterializeMySQL`表有一些细节: + +- 如果`_version`在`SELECT`中没有指定,则使用[FINAL](../../sql-reference/statements/select/from.md#select-from-final)修饰符。所以只有带有`MAX(_version)`的行才会被选中。 + +- 如果`_sign`在`SELECT`中没有指定,则默认使用`WHERE _sign=1`。因此,删除的行不会包含在结果集中。 + +- 结果包括列中的列注释,因为它们存在于SQL数据库表中。 + +### Index Conversion {#index-conversion} + +MySQL的`PRIMARY KEY`和`INDEX`子句在ClickHouse表中转换为`ORDER BY`元组。 + +ClickHouse只有一个物理顺序,由`ORDER BY`子句决定。要创建一个新的物理顺序,使用[materialized views](../../sql-reference/statements/create/view.md#materialized)。 + +**Notes** + +- 带有`_sign=-1`的行不会从表中物理删除。 +- `MaterializeMySQL`引擎不支持级联`UPDATE/DELETE`查询。 +- 复制很容易被破坏。 +- 禁止对数据库和表进行手工操作。 +- `MaterializeMySQL`受[optimize_on_insert](../../operations/settings/settings.md#optimize-on-insert)设置的影响。当MySQL服务器中的表发生变化时,数据会合并到`MaterializeMySQL`数据库中相应的表中。 + +## 使用示例 {#examples-of-use} + +MySQL操作: + +``` sql +mysql> CREATE DATABASE db; +mysql> CREATE TABLE db.test (a INT PRIMARY KEY, b INT); +mysql> INSERT INTO db.test VALUES (1, 11), (2, 22); +mysql> DELETE FROM db.test WHERE a=1; +mysql> ALTER TABLE db.test ADD COLUMN c VARCHAR(16); +mysql> UPDATE db.test SET c='Wow!', b=222; +mysql> SELECT * FROM test; +``` + +```text ++---+------+------+ +| a | b | c | ++---+------+------+ +| 2 | 222 | Wow! | ++---+------+------+ +``` + +ClickHouse中的数据库,与MySQL服务器交换数据: + +创建的数据库和表: + +``` sql +CREATE DATABASE mysql ENGINE = MaterializeMySQL('localhost:3306', 'db', 'user', '***'); +SHOW TABLES FROM mysql; +``` + +``` text +┌─name─┐ +│ test │ +└──────┘ +``` + +然后插入数据: + +``` sql +SELECT * FROM mysql.test; +``` + +``` text +┌─a─┬──b─┐ +│ 1 │ 11 │ +│ 2 │ 22 │ +└───┴────┘ +``` + +删除数据后,添加列并更新: + +``` sql +SELECT * FROM mysql.test; +``` + +``` text +┌─a─┬───b─┬─c────┐ +│ 2 │ 222 │ Wow! │ +└───┴─────┴──────┘ +``` + +[来源文章](https://clickhouse.com/docs/en/engines/database-engines/materialize-mysql/) diff --git a/docs/zh/engines/database-engines/materialized-mysql.md b/docs/zh/engines/database-engines/materialized-mysql.md new file mode 120000 index 00000000000..02118b85df4 --- /dev/null +++ b/docs/zh/engines/database-engines/materialized-mysql.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/materialized-mysql.md \ No newline at end of file diff --git a/docs/zh/engines/database-engines/materialized-postgresql.md b/docs/zh/engines/database-engines/materialized-postgresql.md new file mode 100644 index 00000000000..bce48e1eaff --- /dev/null +++ b/docs/zh/engines/database-engines/materialized-postgresql.md @@ -0,0 +1,85 @@ +--- +toc_priority: 30 +toc_title: MaterializedPostgreSQL +--- + +# [experimental] MaterializedPostgreSQL {#materialize-postgresql} + +使用PostgreSQL数据库表的初始数据转储创建ClickHouse数据库,并启动复制过程,即执行后台作业,以便在远程PostgreSQL数据库中的PostgreSQL数据库表上发生新更改时应用这些更改。 + +ClickHouse服务器作为PostgreSQL副本工作。它读取WAL并执行DML查询。DDL不是复制的,但可以处理(如下所述)。 + +## 创建数据库 {#creating-a-database} + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] +ENGINE = MaterializedPostgreSQL('host:port', ['database' | database], 'user', 'password') [SETTINGS ...] +``` + +**Engine参数** + +- `host:port` — PostgreSQL服务地址 +- `database` — PostgreSQL数据库名 +- `user` — PostgreSQL用户名 +- `password` — 用户密码 + +## 设置 {#settings} + +- [materialized_postgresql_max_block_size](../../operations/settings/settings.md#materialized-postgresql-max-block-size) + +- [materialized_postgresql_tables_list](../../operations/settings/settings.md#materialized-postgresql-tables-list) + +- [materialized_postgresql_allow_automatic_update](../../operations/settings/settings.md#materialized-postgresql-allow-automatic-update) + +``` sql +CREATE DATABASE database1 +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password') +SETTINGS materialized_postgresql_max_block_size = 65536, + materialized_postgresql_tables_list = 'table1,table2,table3'; + +SELECT * FROM database1.table1; +``` + +## 必备条件 {#requirements} + +- 在postgresql配置文件中将[wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html)设置为`logical`,将`max_replication_slots`设置为`2`。 + +- 每个复制表必须具有以下一个[replica identity](https://www.postgresql.org/docs/10/sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY): + +1. **default** (主键) + +2. **index** + +``` bash +postgres# CREATE TABLE postgres_table (a Integer NOT NULL, b Integer, c Integer NOT NULL, d Integer, e Integer NOT NULL); +postgres# CREATE unique INDEX postgres_table_index on postgres_table(a, c, e); +postgres# ALTER TABLE postgres_table REPLICA IDENTITY USING INDEX postgres_table_index; +``` + +总是先检查主键。如果不存在,则检查索引(定义为副本标识索引)。 +如果使用index作为副本标识,则表中必须只有一个这样的索引。 +你可以用下面的命令来检查一个特定的表使用了什么类型: + +``` bash +postgres# SELECT CASE relreplident + WHEN 'd' THEN 'default' + WHEN 'n' THEN 'nothing' + WHEN 'f' THEN 'full' + WHEN 'i' THEN 'index' + END AS replica_identity +FROM pg_class +WHERE oid = 'postgres_table'::regclass; +``` + +## 注意 {#warning} + +1. [**TOAST**](https://www.postgresql.org/docs/9.5/storage-toast.html)不支持值转换。将使用数据类型的默认值。 + +## 使用示例 {#example-of-use} + +``` sql +CREATE DATABASE postgresql_db +ENGINE = MaterializedPostgreSQL('postgres1:5432', 'postgres_database', 'postgres_user', 'postgres_password'); + +SELECT * FROM postgresql_db.postgres_table; +``` diff --git a/docs/zh/engines/database-engines/mysql.md b/docs/zh/engines/database-engines/mysql.md index fa2cb1ea8e5..fe9ab8f077d 100644 --- a/docs/zh/engines/database-engines/mysql.md +++ b/docs/zh/engines/database-engines/mysql.md @@ -1,6 +1,11 @@ +--- +toc_priority: 30 +toc_title: MySQL +--- + # MySQL {#mysql} -MySQL引擎用于将远程的MySQL服务器中的表映射到ClickHouse中,并允许您对表进行`INSERT`和`SELECT`查询,以方便您在ClickHouse与MySQL之间进行数据交换。 +MySQL引擎用于将远程的MySQL服务器中的表映射到ClickHouse中,并允许您对表进行`INSERT`和`SELECT`查询,以方便您在ClickHouse与MySQL之间进行数据交换 `MySQL`数据库引擎会将对其的查询转换为MySQL语法并发送到MySQL服务器中,因此您可以执行诸如`SHOW TABLES`或`SHOW CREATE TABLE`之类的操作。 @@ -10,67 +15,86 @@ MySQL引擎用于将远程的MySQL服务器中的表映射到ClickHouse中,并 - `CREATE TABLE` - `ALTER` -## CREATE DATABASE {#create-database} +## 创建数据库 {#creating-a-database} ``` sql CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] ENGINE = MySQL('host:port', ['database' | database], 'user', 'password') ``` -**MySQL数据库引擎参数** +**引擎参数** -- `host:port` — 链接的MySQL地址。 -- `database` — 链接的MySQL数据库。 -- `user` — 链接的MySQL用户。 -- `password` — 链接的MySQL用户密码。 +- `host:port` — MySQL服务地址 +- `database` — MySQL数据库名称 +- `user` — MySQL用户名 +- `password` — MySQL用户密码 -## 支持的类型对应 {#zhi-chi-de-lei-xing-dui-ying} +## 支持的数据类型 {#data_types-support} -| MySQL | ClickHouse | -|----------------------------------|-------------------------------------------------------------| -| UNSIGNED TINYINT | [UInt8](../../sql-reference/data-types/int-uint.md) | -| TINYINT | [Int8](../../sql-reference/data-types/int-uint.md) | -| UNSIGNED SMALLINT | [UInt16](../../sql-reference/data-types/int-uint.md) | -| SMALLINT | [Int16](../../sql-reference/data-types/int-uint.md) | -| UNSIGNED INT, UNSIGNED MEDIUMINT | [UInt32](../../sql-reference/data-types/int-uint.md) | -| INT, MEDIUMINT | [Int32](../../sql-reference/data-types/int-uint.md) | -| UNSIGNED BIGINT | [UInt64](../../sql-reference/data-types/int-uint.md) | -| BIGINT | [Int64](../../sql-reference/data-types/int-uint.md) | -| FLOAT | [Float32](../../sql-reference/data-types/float.md) | -| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | -| DATE | [日期](../../sql-reference/data-types/date.md) | -| DATETIME, TIMESTAMP | [日期时间](../../sql-reference/data-types/datetime.md) | -| BINARY | [固定字符串](../../sql-reference/data-types/fixedstring.md) | +| MySQL | ClickHouse | +|----------------------------------|--------------------------------------------------------------| +| UNSIGNED TINYINT | [UInt8](../../sql-reference/data-types/int-uint.md) | +| TINYINT | [Int8](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED SMALLINT | [UInt16](../../sql-reference/data-types/int-uint.md) | +| SMALLINT | [Int16](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED INT, UNSIGNED MEDIUMINT | [UInt32](../../sql-reference/data-types/int-uint.md) | +| INT, MEDIUMINT | [Int32](../../sql-reference/data-types/int-uint.md) | +| UNSIGNED BIGINT | [UInt64](../../sql-reference/data-types/int-uint.md) | +| BIGINT | [Int64](../../sql-reference/data-types/int-uint.md) | +| FLOAT | [Float32](../../sql-reference/data-types/float.md) | +| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | +| DATE | [Date](../../sql-reference/data-types/date.md) | +| DATETIME, TIMESTAMP | [DateTime](../../sql-reference/data-types/datetime.md) | +| BINARY | [FixedString](../../sql-reference/data-types/fixedstring.md) | -其他的MySQL数据类型将全部都转换为[字符串](../../sql-reference/data-types/string.md)。 +其他的MySQL数据类型将全部都转换为[String](../../sql-reference/data-types/string.md). -同时以上的所有类型都支持[可为空](../../sql-reference/data-types/nullable.md)。 +[Nullable](../../sql-reference/data-types/nullable.md)已经支持 -## 使用示例 {#shi-yong-shi-li} +## 全局变量支持 {#global-variables-support} -在MySQL中创建表: +为了更好地兼容,您可以在SQL样式中设置全局变量,如`@@identifier`. - mysql> USE test; - Database changed +支持这些变量: +- `version` +- `max_allowed_packet` - mysql> CREATE TABLE `mysql_table` ( - -> `int_id` INT NOT NULL AUTO_INCREMENT, - -> `float` FLOAT NOT NULL, - -> PRIMARY KEY (`int_id`)); - Query OK, 0 rows affected (0,09 sec) +!!! warning "警告" +到目前为止,这些变量是存根,并且不对应任何内容。 - mysql> insert into mysql_table (`int_id`, `float`) VALUES (1,2); - Query OK, 1 row affected (0,00 sec) +示例: - mysql> select * from mysql_table; - +--------+-------+ - | int_id | value | - +--------+-------+ - | 1 | 2 | - +--------+-------+ - 1 row in set (0,00 sec) +``` sql +SELECT @@version; +``` -在ClickHouse中创建MySQL类型的数据库,同时与MySQL服务器交换数据: +## 使用示例 {#examples-of-use} + +MySQL操作: + +``` text +mysql> USE test; +Database changed + +mysql> CREATE TABLE `mysql_table` ( + -> `int_id` INT NOT NULL AUTO_INCREMENT, + -> `float` FLOAT NOT NULL, + -> PRIMARY KEY (`int_id`)); +Query OK, 0 rows affected (0,09 sec) + +mysql> insert into mysql_table (`int_id`, `float`) VALUES (1,2); +Query OK, 1 row affected (0,00 sec) + +mysql> select * from mysql_table; ++------+-----+ +| int_id | value | ++------+-----+ +| 1 | 2 | ++------+-----+ +1 row in set (0,00 sec) +``` + +ClickHouse中的数据库,与MySQL服务器交换数据: ``` sql CREATE DATABASE mysql_db ENGINE = MySQL('localhost:3306', 'test', 'my_user', 'user_password') @@ -123,4 +147,4 @@ SELECT * FROM mysql_db.mysql_table └────────┴───────┘ ``` -[来源文章](https://clickhouse.tech/docs/en/database_engines/mysql/) +[来源文章](https://clickhouse.com/docs/en/database_engines/mysql/) diff --git a/docs/zh/engines/database-engines/postgresql.md b/docs/zh/engines/database-engines/postgresql.md new file mode 100644 index 00000000000..12b8133f404 --- /dev/null +++ b/docs/zh/engines/database-engines/postgresql.md @@ -0,0 +1,138 @@ +--- +toc_priority: 35 +toc_title: PostgreSQL +--- + +# PostgreSQL {#postgresql} + +允许连接到远程[PostgreSQL](https://www.postgresql.org)服务。支持读写操作(`SELECT`和`INSERT`查询),以在ClickHouse和PostgreSQL之间交换数据。 + +在`SHOW TABLES`和`DESCRIBE TABLE`查询的帮助下,从远程PostgreSQL实时访问表列表和表结构。 + +支持表结构修改(`ALTER TABLE ... ADD|DROP COLUMN`)。如果`use_table_cache`参数(参见下面的引擎参数)设置为`1`,则会缓存表结构,不会检查是否被修改,但可以用`DETACH`和`ATTACH`查询进行更新。 + +## 创建数据库 {#creating-a-database} + +``` sql +CREATE DATABASE test_database +ENGINE = PostgreSQL('host:port', 'database', 'user', 'password'[, `use_table_cache`]); +``` + +**引擎参数** + +- `host:port` — PostgreSQL服务地址 +- `database` — 远程数据库名次 +- `user` — PostgreSQL用户名称 +- `password` — PostgreSQL用户密码 +- `use_table_cache` — 定义数据库表结构是否已缓存或不进行。可选的。默认值: `0`. + +## 支持的数据类型 {#data_types-support} + +| PostgerSQL | ClickHouse | +|------------------|--------------------------------------------------------------| +| DATE | [Date](../../sql-reference/data-types/date.md) | +| TIMESTAMP | [DateTime](../../sql-reference/data-types/datetime.md) | +| REAL | [Float32](../../sql-reference/data-types/float.md) | +| DOUBLE | [Float64](../../sql-reference/data-types/float.md) | +| DECIMAL, NUMERIC | [Decimal](../../sql-reference/data-types/decimal.md) | +| SMALLINT | [Int16](../../sql-reference/data-types/int-uint.md) | +| INTEGER | [Int32](../../sql-reference/data-types/int-uint.md) | +| BIGINT | [Int64](../../sql-reference/data-types/int-uint.md) | +| SERIAL | [UInt32](../../sql-reference/data-types/int-uint.md) | +| BIGSERIAL | [UInt64](../../sql-reference/data-types/int-uint.md) | +| TEXT, CHAR | [String](../../sql-reference/data-types/string.md) | +| INTEGER | Nullable([Int32](../../sql-reference/data-types/int-uint.md))| +| ARRAY | [Array](../../sql-reference/data-types/array.md) | + + +## 使用示例 {#examples-of-use} + +ClickHouse中的数据库,与PostgreSQL服务器交换数据: + +``` sql +CREATE DATABASE test_database +ENGINE = PostgreSQL('postgres1:5432', 'test_database', 'postgres', 'mysecretpassword', 1); +``` + +``` sql +SHOW DATABASES; +``` + +``` text +┌─name──────────┐ +│ default │ +│ test_database │ +│ system │ +└───────────────┘ +``` + +``` sql +SHOW TABLES FROM test_database; +``` + +``` text +┌─name───────┐ +│ test_table │ +└────────────┘ +``` + +从PostgreSQL表中读取数据: + +``` sql +SELECT * FROM test_database.test_table; +``` + +``` text +┌─id─┬─value─┐ +│ 1 │ 2 │ +└────┴───────┘ +``` + +将数据写入PostgreSQL表: + +``` sql +INSERT INTO test_database.test_table VALUES (3,4); +SELECT * FROM test_database.test_table; +``` + +``` text +┌─int_id─┬─value─┐ +│ 1 │ 2 │ +│ 3 │ 4 │ +└────────┴───────┘ +``` + +在PostgreSQL中修改了表结构: + +``` sql +postgre> ALTER TABLE test_table ADD COLUMN data Text +``` + +当创建数据库时,参数`use_table_cache`被设置为`1`,ClickHouse中的表结构被缓存,因此没有被修改: + +``` sql +DESCRIBE TABLE test_database.test_table; +``` +``` text +┌─name───┬─type──────────────┐ +│ id │ Nullable(Integer) │ +│ value │ Nullable(Integer) │ +└────────┴───────────────────┘ +``` + +分离表并再次附加它之后,结构被更新了: + +``` sql +DETACH TABLE test_database.test_table; +ATTACH TABLE test_database.test_table; +DESCRIBE TABLE test_database.test_table; +``` +``` text +┌─name───┬─type──────────────┐ +│ id │ Nullable(Integer) │ +│ value │ Nullable(Integer) │ +│ data │ Nullable(String) │ +└────────┴───────────────────┘ +``` + +[来源文章](https://clickhouse.com/docs/en/database-engines/postgresql/) diff --git a/docs/zh/engines/database-engines/replicated.md b/docs/zh/engines/database-engines/replicated.md new file mode 100644 index 00000000000..9ffebe04571 --- /dev/null +++ b/docs/zh/engines/database-engines/replicated.md @@ -0,0 +1,116 @@ +# [experimental] Replicated {#replicated} + +该引擎基于[Atomic](../../engines/database-engines/atomic.md)引擎。它支持通过将DDL日志写入ZooKeeper并在给定数据库的所有副本上执行的元数据复制。 + +一个ClickHouse服务器可以同时运行和更新多个复制的数据库。但是同一个复制的数据库不能有多个副本。 + +## 创建数据库 {#creating-a-database} + +``` sql +CREATE DATABASE testdb ENGINE = Replicated('zoo_path', 'shard_name', 'replica_name') [SETTINGS ...] +``` + +**引擎参数** + +- `zoo_path` — ZooKeeper地址,同一个ZooKeeper路径对应同一个数据库。 +- `shard_name` — 分片的名字。数据库副本按`shard_name`分组到分片中。 +- `replica_name` — 副本的名字。同一分片的所有副本的副本名称必须不同。 + +!!! note "警告" +对于[ReplicatedMergeTree](../table-engines/mergetree-family/replication.md#table_engines-replication)表,如果没有提供参数,则使用默认参数:`/clickhouse/tables/{uuid}/{shard}`和`{replica}`。这些可以在服务器设置[default_replica_path](../../operations/server-configuration-parameters/settings.md#default_replica_path)和[default_replica_name](../../operations/server-configuration-parameters/settings.md#default_replica_name)中更改。宏`{uuid}`被展开到表的uuid, `{shard}`和`{replica}`被展开到服务器配置的值,而不是数据库引擎参数。但是在将来,可以使用Replicated数据库的`shard_name`和`replica_name`。 + +## 使用方式 {#specifics-and-recommendations} + +使用`Replicated`数据库的DDL查询的工作方式类似于[ON CLUSTER](../../sql-reference/distributed-ddl.md)查询,但有细微差异。 + +首先,DDL请求尝试在启动器(最初从用户接收请求的主机)上执行。如果请求没有完成,那么用户立即收到一个错误,其他主机不会尝试完成它。如果在启动器上成功地完成了请求,那么所有其他主机将自动重试,直到完成请求。启动器将尝试在其他主机上等待查询完成(不超过[distributed_ddl_task_timeout](../../operations/settings/settings.md#distributed_ddl_task_timeout)),并返回一个包含每个主机上查询执行状态的表。 + +错误情况下的行为是由[distributed_ddl_output_mode](../../operations/settings/settings.md#distributed_ddl_output_mode)设置调节的,对于`Replicated`数据库,最好将其设置为`null_status_on_timeout` - 例如,如果一些主机没有时间执行[distributed_ddl_task_timeout](../../operations/settings/settings.md#distributed_ddl_task_timeout)的请求,那么不要抛出异常,但在表中显示它们的`NULL`状态。 + +[system.clusters](../../operations/system-tables/clusters.md)系统表包含一个名为复制数据库的集群,它包含数据库的所有副本。当创建/删除副本时,这个集群会自动更新,它可以用于[Distributed](../../engines/table-engines/special/distributed.md#distributed)表。 + +当创建数据库的新副本时,该副本会自己创建表。如果副本已经不可用很长一段时间,并且已经滞后于复制日志-它用ZooKeeper中的当前元数据检查它的本地元数据,将带有数据的额外表移动到一个单独的非复制数据库(以免意外地删除任何多余的东西),创建缺失的表,如果表名已经被重命名,则更新表名。数据在`ReplicatedMergeTree`级别被复制,也就是说,如果表没有被复制,数据将不会被复制(数据库只负责元数据)。 + +## 使用示例 {#usage-example} + +创建三台主机的集群: + +``` sql +node1 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','shard1','replica1'); +node2 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','shard1','other_replica'); +node3 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','other_shard','{replica}'); +``` + +运行DDL: + +``` sql +CREATE TABLE r.rmt (n UInt64) ENGINE=ReplicatedMergeTree ORDER BY n; +``` + +``` text +┌─────hosts────────────┬──status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐ +│ shard1|replica1 │ 0 │ │ 2 │ 0 │ +│ shard1|other_replica │ 0 │ │ 1 │ 0 │ +│ other_shard|r1 │ 0 │ │ 0 │ 0 │ +└──────────────────────┴─────────┴───────┴─────────────────────┴──────────────────┘ +``` + +显示系统表: + +``` sql +SELECT cluster, shard_num, replica_num, host_name, host_address, port, is_local +FROM system.clusters WHERE cluster='r'; +``` + +``` text +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ +│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +│ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ +│ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ +└─────────┴───────────┴─────────────┴───────────┴──────────────┴──────┴──────────┘ +``` + +创建分布式表并插入数据: + +``` sql +node2 :) CREATE TABLE r.d (n UInt64) ENGINE=Distributed('r','r','rmt', n % 2); +node3 :) INSERT INTO r SELECT * FROM numbers(10); +node1 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY host; +``` + +``` text +┌─hosts─┬─groupArray(n)─┐ +│ node1 │ [1,3,5,7,9] │ +│ node2 │ [0,2,4,6,8] │ +└───────┴───────────────┘ +``` + +向一台主机添加副本: + +``` sql +node4 :) CREATE DATABASE r ENGINE=Replicated('some/path/r','other_shard','r2'); +``` + +集群配置如下所示: + +``` text +┌─cluster─┬─shard_num─┬─replica_num─┬─host_name─┬─host_address─┬─port─┬─is_local─┐ +│ r │ 1 │ 1 │ node3 │ 127.0.0.1 │ 9002 │ 0 │ +│ r │ 1 │ 2 │ node4 │ 127.0.0.1 │ 9003 │ 0 │ +│ r │ 2 │ 1 │ node2 │ 127.0.0.1 │ 9001 │ 0 │ +│ r │ 2 │ 2 │ node1 │ 127.0.0.1 │ 9000 │ 1 │ +└─────────┴───────────┴─────────────┴───────────┴──────────────┴──────┴──────────┘ +``` + +分布式表也将从新主机获取数据: + +```sql +node2 :) SELECT materialize(hostName()) AS host, groupArray(n) FROM r.d GROUP BY host; +``` + +```text +┌─hosts─┬─groupArray(n)─┐ +│ node2 │ [1,3,5,7,9] │ +│ node4 │ [0,2,4,6,8] │ +└───────┴───────────────┘ +``` diff --git a/docs/zh/engines/database-engines/sqlite.md b/docs/zh/engines/database-engines/sqlite.md new file mode 120000 index 00000000000..776734647c2 --- /dev/null +++ b/docs/zh/engines/database-engines/sqlite.md @@ -0,0 +1 @@ +../../../en/engines/database-engines/sqlite.md \ No newline at end of file diff --git a/docs/zh/engines/table-engines/integrations/ExternalDistributed.md b/docs/zh/engines/table-engines/integrations/ExternalDistributed.md new file mode 120000 index 00000000000..f843983ad4d --- /dev/null +++ b/docs/zh/engines/table-engines/integrations/ExternalDistributed.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/ExternalDistributed.md \ No newline at end of file diff --git a/docs/zh/engines/table-engines/integrations/embedded-rocksdb.md b/docs/zh/engines/table-engines/integrations/embedded-rocksdb.md index 7c04600894e..79ca8f0cd10 100644 --- a/docs/zh/engines/table-engines/integrations/embedded-rocksdb.md +++ b/docs/zh/engines/table-engines/integrations/embedded-rocksdb.md @@ -39,4 +39,4 @@ ENGINE = EmbeddedRocksDB PRIMARY KEY key ``` -[原始文章](https://clickhouse.tech/docs/en/engines/table-engines/integrations/embedded-rocksdb/) +[原始文章](https://clickhouse.com/docs/en/engines/table-engines/integrations/embedded-rocksdb/) diff --git a/docs/zh/engines/table-engines/integrations/hdfs.md b/docs/zh/engines/table-engines/integrations/hdfs.md index 1a6ba0ba9e9..5948c0fa4b2 100644 --- a/docs/zh/engines/table-engines/integrations/hdfs.md +++ b/docs/zh/engines/table-engines/integrations/hdfs.md @@ -205,4 +205,4 @@ CREARE TABLE big_table (name String, value UInt32) ENGINE = HDFS('hdfs://hdfs1:9 - [虚拟列](../index.md#table_engines-virtual_columns) -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/hdfs/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/hdfs/) diff --git a/docs/zh/engines/table-engines/integrations/jdbc.md b/docs/zh/engines/table-engines/integrations/jdbc.md index 4a0ba15ed0d..170d37c64c2 100644 --- a/docs/zh/engines/table-engines/integrations/jdbc.md +++ b/docs/zh/engines/table-engines/integrations/jdbc.md @@ -95,4 +95,4 @@ FROM system.numbers - [JDBC表函数](../../../sql-reference/table-functions/jdbc.md). -[原始文档](https://clickhouse.tech/docs/en/operations/table_engines/jdbc/) +[原始文档](https://clickhouse.com/docs/en/operations/table_engines/jdbc/) diff --git a/docs/zh/engines/table-engines/integrations/kafka.md b/docs/zh/engines/table-engines/integrations/kafka.md index 0118b6795e4..6784b366e85 100644 --- a/docs/zh/engines/table-engines/integrations/kafka.md +++ b/docs/zh/engines/table-engines/integrations/kafka.md @@ -132,4 +132,4 @@ Kafka 特性: 有关详细配置选项列表,请参阅 [librdkafka配置参考](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md)。在 ClickHouse 配置中使用下划线 (`_`) ,并不是使用点 (`.`)。例如,`check.crcs=true` 将是 `true`。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/kafka/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/kafka/) diff --git a/docs/zh/engines/table-engines/integrations/materialized-postgresql.md b/docs/zh/engines/table-engines/integrations/materialized-postgresql.md new file mode 120000 index 00000000000..c8dcba4bc19 --- /dev/null +++ b/docs/zh/engines/table-engines/integrations/materialized-postgresql.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/materialized-postgresql.md \ No newline at end of file diff --git a/docs/zh/engines/table-engines/integrations/mongodb.md b/docs/zh/engines/table-engines/integrations/mongodb.md index ff3fdae5b40..a91e81a26ad 100644 --- a/docs/zh/engines/table-engines/integrations/mongodb.md +++ b/docs/zh/engines/table-engines/integrations/mongodb.md @@ -54,4 +54,4 @@ SELECT COUNT() FROM mongo_table; └─────────┘ ``` -[原始文章](https://clickhouse.tech/docs/en/engines/table-engines/integrations/mongodb/) +[原始文章](https://clickhouse.com/docs/en/engines/table-engines/integrations/mongodb/) diff --git a/docs/zh/engines/table-engines/integrations/mysql.md b/docs/zh/engines/table-engines/integrations/mysql.md index 526e2d6f865..39a7eabda35 100644 --- a/docs/zh/engines/table-engines/integrations/mysql.md +++ b/docs/zh/engines/table-engines/integrations/mysql.md @@ -22,4 +22,4 @@ MySQL 引擎可以对存储在远程 MySQL 服务器上的数据执行 `SELECT` `MySQL` 引擎不支持 [可为空](../../../engines/table-engines/integrations/mysql.md) 数据类型,因此,当从MySQL表中读取数据时,`NULL` 将转换为指定列类型的默认值(通常为0或空字符串)。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/mysql/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/mysql/) diff --git a/docs/zh/engines/table-engines/integrations/odbc.md b/docs/zh/engines/table-engines/integrations/odbc.md index 58eb2ffe94c..383bf99aed5 100644 --- a/docs/zh/engines/table-engines/integrations/odbc.md +++ b/docs/zh/engines/table-engines/integrations/odbc.md @@ -128,4 +128,4 @@ SELECT * FROM odbc_t - [ODBC 外部字典](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-odbc) - [ODBC 表函数](../../../sql-reference/table-functions/odbc.md) -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/odbc/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/odbc/) diff --git a/docs/zh/engines/table-engines/integrations/postgresql.md b/docs/zh/engines/table-engines/integrations/postgresql.md index df1e74ce763..17ca59be469 100644 --- a/docs/zh/engines/table-engines/integrations/postgresql.md +++ b/docs/zh/engines/table-engines/integrations/postgresql.md @@ -142,4 +142,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [使用 PostgreSQL 作为外部字典的来源](../../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-postgresql) -[原始文章](https://clickhouse.tech/docs/en/engines/table-engines/integrations/postgresql/) +[原始文章](https://clickhouse.com/docs/en/engines/table-engines/integrations/postgresql/) diff --git a/docs/zh/engines/table-engines/integrations/rabbitmq.md b/docs/zh/engines/table-engines/integrations/rabbitmq.md index a4a5be5f685..74b4e4d1f93 100644 --- a/docs/zh/engines/table-engines/integrations/rabbitmq.md +++ b/docs/zh/engines/table-engines/integrations/rabbitmq.md @@ -164,4 +164,4 @@ Exchange 类型的选项: - `_message_id` - 收到的消息的ID;如果在消息发布时被设置,则为非空. - `_timestamp` - 收到的消息的时间戳;如果在消息发布时被设置,则为非空. -[原始文章](https://clickhouse.tech/docs/en/engines/table-engines/integrations/rabbitmq/) +[原始文章](https://clickhouse.com/docs/en/engines/table-engines/integrations/rabbitmq/) diff --git a/docs/zh/engines/table-engines/integrations/sqlite.md b/docs/zh/engines/table-engines/integrations/sqlite.md new file mode 120000 index 00000000000..56d0a490f52 --- /dev/null +++ b/docs/zh/engines/table-engines/integrations/sqlite.md @@ -0,0 +1 @@ +../../../../en/engines/table-engines/integrations/sqlite.md \ No newline at end of file diff --git a/docs/zh/engines/table-engines/log-family/index.md b/docs/zh/engines/table-engines/log-family/index.md index c45a68b2aae..75c84409aa0 100644 --- a/docs/zh/engines/table-engines/log-family/index.md +++ b/docs/zh/engines/table-engines/log-family/index.md @@ -48,4 +48,4 @@ toc_priority: 29 `TinyLog` 引擎是该系列中最简单的引擎并且提供了最少的功能和最低的性能。`TinyLog` 引擎不支持并行读取和并发数据访问,并将每一列存储在不同的文件中。它比其余两种支持并行读取的引擎的读取速度更慢,并且使用了和 `Log` 引擎同样多的描述符。你可以在简单的低负载的情景下使用它。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/log_family/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/log_family/) diff --git a/docs/zh/engines/table-engines/log-family/log.md b/docs/zh/engines/table-engines/log-family/log.md index 5d3ee38d745..c825868bcda 100644 --- a/docs/zh/engines/table-engines/log-family/log.md +++ b/docs/zh/engines/table-engines/log-family/log.md @@ -2,4 +2,4 @@ `Log` 与 `TinyLog` 的不同之处在于,«标记» 的小文件与列文件存在一起。这些标记写在每个数据块上,并且包含偏移量,这些偏移量指示从哪里开始读取文件以便跳过指定的行数。这使得可以在多个线程中读取表数据。对于并发数据访问,可以同时执行读取操作,而写入操作则阻塞读取和其它写入。`Log`引擎不支持索引。同样,如果写入表失败,则该表将被破坏,并且从该表读取将返回错误。`Log`引擎适用于临时数据,write-once 表以及测试或演示目的。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/log/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/log/) diff --git a/docs/zh/engines/table-engines/log-family/stripelog.md b/docs/zh/engines/table-engines/log-family/stripelog.md index e10d9afd98d..dbb725d3a72 100644 --- a/docs/zh/engines/table-engines/log-family/stripelog.md +++ b/docs/zh/engines/table-engines/log-family/stripelog.md @@ -79,4 +79,4 @@ SELECT * FROM stripe_log_table ORDER BY timestamp │ 2019-01-18 14:34:53 │ WARNING │ The first warning message │ └─────────────────────┴──────────────┴────────────────────────────┘ -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/stripelog/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/stripelog/) diff --git a/docs/zh/engines/table-engines/log-family/tinylog.md b/docs/zh/engines/table-engines/log-family/tinylog.md index bb67eaa67a5..533e5a89528 100644 --- a/docs/zh/engines/table-engines/log-family/tinylog.md +++ b/docs/zh/engines/table-engines/log-family/tinylog.md @@ -10,4 +10,4 @@ 在 Yandex.Metrica 中,TinyLog 表用于小批量处理的中间数据。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/tinylog/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/tinylog/) diff --git a/docs/zh/engines/table-engines/mergetree-family/aggregatingmergetree.md b/docs/zh/engines/table-engines/mergetree-family/aggregatingmergetree.md index 03825a41f95..4fbb55c270b 100644 --- a/docs/zh/engines/table-engines/mergetree-family/aggregatingmergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/aggregatingmergetree.md @@ -95,4 +95,4 @@ GROUP BY StartDate ORDER BY StartDate; ``` -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/aggregatingmergetree/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/aggregatingmergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/collapsingmergetree.md b/docs/zh/engines/table-engines/mergetree-family/collapsingmergetree.md index 6fb57dc19d9..09f0d2aee1d 100644 --- a/docs/zh/engines/table-engines/mergetree-family/collapsingmergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/collapsingmergetree.md @@ -203,4 +203,4 @@ SELECT * FROM UAct FINAL 这种查询数据的方法是非常低效的。不要在大表中使用它。 -[原文](https://clickhouse.tech/docs/en/operations/table_engines/collapsingmergetree/) +[原文](https://clickhouse.com/docs/en/operations/table_engines/collapsingmergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/custom-partitioning-key.md b/docs/zh/engines/table-engines/mergetree-family/custom-partitioning-key.md index 71249e39ed2..8694fe88027 100644 --- a/docs/zh/engines/table-engines/mergetree-family/custom-partitioning-key.md +++ b/docs/zh/engines/table-engines/mergetree-family/custom-partitioning-key.md @@ -117,4 +117,4 @@ drwxr-xr-x 2 clickhouse clickhouse 4096 Feb 1 16:48 detached ClickHouse 支持对分区执行这些操作:删除分区,将分区从一个表复制到另一个表,或创建备份。了解分区的所有操作,请参阅 [分区和片段的操作](../../../sql-reference/statements/alter.md#alter_manipulations-with-partitions) 一节。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/custom_partitioning_key/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/custom_partitioning_key/) diff --git a/docs/zh/engines/table-engines/mergetree-family/graphitemergetree.md b/docs/zh/engines/table-engines/mergetree-family/graphitemergetree.md index fa17e0d5c5e..044ea442db3 100644 --- a/docs/zh/engines/table-engines/mergetree-family/graphitemergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/graphitemergetree.md @@ -164,4 +164,4 @@ CH在处理行记录时,会检查 `pattern`节点的规则。每个 `pattern` ``` -[原始文档](https://clickhouse.tech/docs/en/operations/table_engines/graphitemergetree/) +[原始文档](https://clickhouse.com/docs/en/operations/table_engines/graphitemergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/mergetree.md b/docs/zh/engines/table-engines/mergetree-family/mergetree.md index 45e080fd640..b2e240f4f19 100644 --- a/docs/zh/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/mergetree.md @@ -58,7 +58,7 @@ ORDER BY expr 如果没有使用 `PRIMARY KEY` 显式指定的主键,ClickHouse 会使用排序键作为主键。 - 如果不需要排序,可以使用 `ORDER BY tuple()`. 参考 [选择主键](https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/mergetree/#selecting-the-primary-key) + 如果不需要排序,可以使用 `ORDER BY tuple()`. 参考 [选择主键](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#selecting-the-primary-key) - `PARTITION BY` — [分区键](custom-partitioning-key.md) ,可选项。 @@ -90,7 +90,7 @@ ORDER BY expr - `index_granularity_bytes` — 索引粒度,以字节为单位,默认值: 10Mb。如果想要仅按数据行数限制索引粒度, 请设置为0(不建议)。 - `min_index_granularity_bytes` - 允许的最小数据粒度,默认值:1024b。该选项用于防止误操作,添加了一个非常低索引粒度的表。参考[数据存储](#mergetree-data-storage) - `enable_mixed_granularity_parts` — 是否启用通过 `index_granularity_bytes` 控制索引粒度的大小。在19.11版本之前, 只有 `index_granularity` 配置能够用于限制索引粒度的大小。当从具有很大的行(几十上百兆字节)的表中查询数据时候,`index_granularity_bytes` 配置能够提升ClickHouse的性能。如果您的表里有很大的行,可以开启这项配置来提升`SELECT` 查询的性能。 - - `use_minimalistic_part_header_in_zookeeper` — ZooKeeper中数据片段存储方式 。如果`use_minimalistic_part_header_in_zookeeper=1` ,ZooKeeper 会存储更少的数据。更多信息参考[服务配置参数]([Server Settings | ClickHouse Documentation](https://clickhouse.tech/docs/zh/operations/server-configuration-parameters/settings/))这章中的 [设置描述](../../../operations/server-configuration-parameters/settings.md#server-settings-use_minimalistic_part_header_in_zookeeper) 。 + - `use_minimalistic_part_header_in_zookeeper` — ZooKeeper中数据片段存储方式 。如果`use_minimalistic_part_header_in_zookeeper=1` ,ZooKeeper 会存储更少的数据。更多信息参考[服务配置参数]([Server Settings | ClickHouse Documentation](https://clickhouse.com/docs/zh/operations/server-configuration-parameters/settings/))这章中的 [设置描述](../../../operations/server-configuration-parameters/settings.md#server-settings-use_minimalistic_part_header_in_zookeeper) 。 - `min_merge_bytes_to_use_direct_io` — 使用直接 I/O 来操作磁盘的合并操作时要求的最小数据量。合并数据片段时,ClickHouse 会计算要被合并的所有数据的总存储空间。如果大小超过了 `min_merge_bytes_to_use_direct_io` 设置的字节数,则 ClickHouse 将使用直接 I/O 接口(`O_DIRECT` 选项)对磁盘读写。如果设置 `min_merge_bytes_to_use_direct_io = 0` ,则会禁用直接 I/O。默认值:`10 * 1024 * 1024 * 1024` 字节。 - `merge_with_ttl_timeout` — TTL合并频率的最小间隔时间,单位:秒。默认值: 86400 (1 天)。 @@ -99,9 +99,9 @@ ORDER BY expr - `storage_policy` — 存储策略。 参见 [使用具有多个块的设备进行数据存储](#table_engine-mergetree-multiple-volumes). - `min_bytes_for_wide_part`,`min_rows_for_wide_part` 在数据片段中可以使用`Wide`格式进行存储的最小字节数/行数。您可以不设置、只设置一个,或全都设置。参考:[数据存储](#mergetree-data-storage) - `max_parts_in_total` - 所有分区中最大块的数量(意义不明) - - `max_compress_block_size` - 在数据压缩写入表前,未压缩数据块的最大大小。您可以在全局设置中设置该值(参见[max_compress_block_size](https://clickhouse.tech/docs/zh/operations/settings/settings/#max-compress-block-size))。建表时指定该值会覆盖全局设置。 - - `min_compress_block_size` - 在数据压缩写入表前,未压缩数据块的最小大小。您可以在全局设置中设置该值(参见[min_compress_block_size](https://clickhouse.tech/docs/zh/operations/settings/settings/#min-compress-block-size))。建表时指定该值会覆盖全局设置。 - - `max_partitions_to_read` - 一次查询中可访问的分区最大数。您可以在全局设置中设置该值(参见[max_partitions_to_read](https://clickhouse.tech/docs/zh/operations/settings/settings/#max_partitions_to_read))。 + - `max_compress_block_size` - 在数据压缩写入表前,未压缩数据块的最大大小。您可以在全局设置中设置该值(参见[max_compress_block_size](https://clickhouse.com/docs/zh/operations/settings/settings/#max-compress-block-size))。建表时指定该值会覆盖全局设置。 + - `min_compress_block_size` - 在数据压缩写入表前,未压缩数据块的最小大小。您可以在全局设置中设置该值(参见[min_compress_block_size](https://clickhouse.com/docs/zh/operations/settings/settings/#min-compress-block-size))。建表时指定该值会覆盖全局设置。 + - `max_partitions_to_read` - 一次查询中可访问的分区最大数。您可以在全局设置中设置该值(参见[max_partitions_to_read](https://clickhouse.com/docs/zh/operations/settings/settings/#max_partitions_to_read))。 **示例配置** @@ -186,7 +186,7 @@ ClickHouse 会为每个数据片段创建一个索引文件来存储这些标记 ClickHouse 不要求主键唯一,所以您可以插入多条具有相同主键的行。 -您可以在`PRIMARY KEY`与`ORDER BY`条件中使用`可为空的`类型的表达式,但强烈建议不要这么做。为了启用这项功能,请打开[allow_nullable_key](https://clickhouse.tech/docs/zh/operations/settings/settings/#allow-nullable-key),[NULLS_LAST](https://clickhouse.tech/docs/zh/sql-reference/statements/select/order-by/#sorting-of-special-values)规则也适用于`ORDER BY`条件中有NULL值的情况下。 +您可以在`PRIMARY KEY`与`ORDER BY`条件中使用`可为空的`类型的表达式,但强烈建议不要这么做。为了启用这项功能,请打开[allow_nullable_key](https://clickhouse.com/docs/zh/operations/settings/settings/#allow-nullable-key),[NULLS_LAST](https://clickhouse.com/docs/zh/sql-reference/statements/select/order-by/#sorting-of-special-values)规则也适用于`ORDER BY`条件中有NULL值的情况下。 ### 主键的选择 {#zhu-jian-de-xuan-ze} @@ -543,7 +543,7 @@ MergeTree 系列表引擎可以将数据存储在多个块设备上。这对某 - 卷 — 相同磁盘的顺序列表 (类似于 [JBOD](https://en.wikipedia.org/wiki/Non-RAID_drive_architectures)) - 存储策略 — 卷的集合及他们之间的数据移动规则 - 以上名称的信息在Clickhouse中系统表[system.storage_policies](https://clickhouse.tech/docs/zh/operations/system-tables/storage_policies/#system_tables-storage_policies)和[system.disks](https://clickhouse.tech/docs/zh/operations/system-tables/disks/#system_tables-disks)体现。为了应用存储策略,可以在建表时使用`storage_policy`设置。 + 以上名称的信息在Clickhouse中系统表[system.storage_policies](https://clickhouse.com/docs/zh/operations/system-tables/storage_policies/#system_tables-storage_policies)和[system.disks](https://clickhouse.com/docs/zh/operations/system-tables/disks/#system_tables-disks)体现。为了应用存储策略,可以在建表时使用`storage_policy`设置。 ### 配置 {#table_engine-mergetree-multiple-volumes_configure} @@ -809,4 +809,4 @@ S3磁盘也可以设置冷热存储: 指定了`cold`选项后,本地磁盘剩余空间如果小于`move_factor * disk_size`,或有TTL设置时,数据就会定时迁移至S3了。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/mergetree/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/mergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/replacingmergetree.md b/docs/zh/engines/table-engines/mergetree-family/replacingmergetree.md index 75ec4ea8b3d..b6815f62405 100644 --- a/docs/zh/engines/table-engines/mergetree-family/replacingmergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/replacingmergetree.md @@ -58,4 +58,4 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster] -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/replacingmergetree/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/replacingmergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/replication.md b/docs/zh/engines/table-engines/mergetree-family/replication.md index a4d03e8da36..2e6391c01dd 100644 --- a/docs/zh/engines/table-engines/mergetree-family/replication.md +++ b/docs/zh/engines/table-engines/mergetree-family/replication.md @@ -199,4 +199,4 @@ sudo -u clickhouse touch /var/lib/clickhouse/flags/force_restore_data 如果 ZooKeeper 中的数据丢失或损坏,如上所述,你可以通过将数据转移到非复制表来保存数据。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/replication/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/replication/) diff --git a/docs/zh/engines/table-engines/mergetree-family/summingmergetree.md b/docs/zh/engines/table-engines/mergetree-family/summingmergetree.md index d05e718c59b..e59c3907811 100644 --- a/docs/zh/engines/table-engines/mergetree-family/summingmergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/summingmergetree.md @@ -121,4 +121,4 @@ ClickHouse 会按片段合并数据,以至于不同的数据片段中会包含 对于嵌套数据结构,你无需在列的元组中指定列以进行汇总。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/summingmergetree/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/summingmergetree/) diff --git a/docs/zh/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md b/docs/zh/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md index 8479c92f56f..b81d2206bf4 100644 --- a/docs/zh/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md +++ b/docs/zh/engines/table-engines/mergetree-family/versionedcollapsingmergetree.md @@ -233,4 +233,4 @@ SELECT * FROM UAct FINAL 这是一个非常低效的方式来选择数据。 不要把它用于数据量大的表。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/versionedcollapsingmergetree/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/versionedcollapsingmergetree/) diff --git a/docs/zh/engines/table-engines/special/buffer.md b/docs/zh/engines/table-engines/special/buffer.md index 253aba2382a..5c48d54676e 100644 --- a/docs/zh/engines/table-engines/special/buffer.md +++ b/docs/zh/engines/table-engines/special/buffer.md @@ -50,4 +50,4 @@ PREWHERE,FINAL 和 SAMPLE 对缓冲表不起作用。这些条件将传递到 请注意,一次插入一行数据是没有意义的,即使对于 Buffer 表也是如此。这将只产生每秒几千行的速度,而插入更大的数据块每秒可以产生超过一百万行(参见 «性能» 部分)。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/buffer/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/buffer/) diff --git a/docs/zh/engines/table-engines/special/dictionary.md b/docs/zh/engines/table-engines/special/dictionary.md index 4908276ef97..50aa5f917d7 100644 --- a/docs/zh/engines/table-engines/special/dictionary.md +++ b/docs/zh/engines/table-engines/special/dictionary.md @@ -98,4 +98,4 @@ LIMIT 1 1 rows in set. Elapsed: 0.006 sec. -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/dictionary/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/dictionary/) diff --git a/docs/zh/engines/table-engines/special/distributed.md b/docs/zh/engines/table-engines/special/distributed.md index 2ee17c13fae..f24d509f151 100644 --- a/docs/zh/engines/table-engines/special/distributed.md +++ b/docs/zh/engines/table-engines/special/distributed.md @@ -117,4 +117,4 @@ SELECT 查询会被发送到所有分片,并且无论数据在分片中如何 启用 max_parallel_replicas 选项后,会在分表的所有副本上并行查询处理。更多信息,请参阅«设置,max_parallel_replicas»部分。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/distributed/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/distributed/) diff --git a/docs/zh/engines/table-engines/special/external-data.md b/docs/zh/engines/table-engines/special/external-data.md index a07a9cda67e..ed44d7ce3b7 100644 --- a/docs/zh/engines/table-engines/special/external-data.md +++ b/docs/zh/engines/table-engines/special/external-data.md @@ -58,4 +58,4 @@ curl -F 'passwd=@passwd.tsv;' 'http://localhost:8123/?query=SELECT+shell,+count( 对于分布式查询,将临时表发送到所有远程服务器。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/external_data/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/external_data/) diff --git a/docs/zh/engines/table-engines/special/file.md b/docs/zh/engines/table-engines/special/file.md index 4464dcf198c..ce4a43bba3f 100644 --- a/docs/zh/engines/table-engines/special/file.md +++ b/docs/zh/engines/table-engines/special/file.md @@ -70,4 +70,4 @@ $ echo -e "1,2\n3,4" | clickhouse-local -q "CREATE TABLE table (a Int64, b Int64 - 索引 - 副本 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/file/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/file/) diff --git a/docs/zh/engines/table-engines/special/generate.md b/docs/zh/engines/table-engines/special/generate.md index 885ad381d7f..bae981ac468 100644 --- a/docs/zh/engines/table-engines/special/generate.md +++ b/docs/zh/engines/table-engines/special/generate.md @@ -54,4 +54,4 @@ SELECT * FROM generate_engine_table LIMIT 3 - Indices - Replication -[原始文档](https://clickhouse.tech/docs/en/operations/table_engines/generate/) +[原始文档](https://clickhouse.com/docs/en/operations/table_engines/generate/) diff --git a/docs/zh/engines/table-engines/special/join.md b/docs/zh/engines/table-engines/special/join.md index 35a50c1a54d..36f5ca6134b 100644 --- a/docs/zh/engines/table-engines/special/join.md +++ b/docs/zh/engines/table-engines/special/join.md @@ -112,4 +112,4 @@ SELECT joinGet('id_val_join', 'val', toUInt32(1)) 如果服务器非正常重启,保存在硬盘上的数据块会丢失或被损坏。这种情况下,需要手动删除被损坏的数据文件。 -[原始文档](https://clickhouse.tech/docs/en/operations/table_engines/join/) +[原始文档](https://clickhouse.com/docs/en/operations/table_engines/join/) diff --git a/docs/zh/engines/table-engines/special/materializedview.md b/docs/zh/engines/table-engines/special/materializedview.md index 21c4008a158..d4c678839b6 100644 --- a/docs/zh/engines/table-engines/special/materializedview.md +++ b/docs/zh/engines/table-engines/special/materializedview.md @@ -2,4 +2,4 @@ 物化视图的使用(更多信息请参阅 [CREATE TABLE](../../../sql-reference/statements/create.md#create-table-query) )。它需要使用一个不同的引擎来存储数据,这个引擎要在创建物化视图时指定。当从表中读取时,它就会使用该引擎。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/materializedview/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/materializedview/) diff --git a/docs/zh/engines/table-engines/special/memory.md b/docs/zh/engines/table-engines/special/memory.md index becf0f3b04f..2e880934652 100644 --- a/docs/zh/engines/table-engines/special/memory.md +++ b/docs/zh/engines/table-engines/special/memory.md @@ -4,4 +4,4 @@ Memory 引擎以未压缩的形式将数据存储在 RAM 中。数据完全以 Memory 引擎是由系统用于临时表进行外部数据的查询(请参阅 «外部数据用于请求处理» 部分),以及用于实现 `GLOBAL IN`(请参见 «IN 运算符» 部分)。 -[原始文章](https://clickhouse.tech/docs/zh/operations/table_engines/memory/) +[原始文章](https://clickhouse.com/docs/zh/operations/table_engines/memory/) diff --git a/docs/zh/engines/table-engines/special/merge.md b/docs/zh/engines/table-engines/special/merge.md index 839842e108f..c29a600bef6 100644 --- a/docs/zh/engines/table-engines/special/merge.md +++ b/docs/zh/engines/table-engines/special/merge.md @@ -60,4 +60,4 @@ 如果 `WHERE/PREWHERE` 子句包含了带 `_table` 的条件,并且没有依赖其他的列(如作为表达式谓词链接的一个子项或作为整个的表达式),这些条件的作用会像索引一样。这些条件会在那些可能被读数据的表的表名上执行,并且读操作只会在那些满足了该条件的表上去执行。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/merge/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/merge/) diff --git a/docs/zh/engines/table-engines/special/null.md b/docs/zh/engines/table-engines/special/null.md index c9fee734f1a..60b91109abe 100644 --- a/docs/zh/engines/table-engines/special/null.md +++ b/docs/zh/engines/table-engines/special/null.md @@ -4,4 +4,4 @@ 但是,可以在 Null 类型的表上创建物化视图。写入表的数据将转发到视图中。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/null/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/null/) diff --git a/docs/zh/engines/table-engines/special/set.md b/docs/zh/engines/table-engines/special/set.md index a4fd0d85bd1..ae522221c14 100644 --- a/docs/zh/engines/table-engines/special/set.md +++ b/docs/zh/engines/table-engines/special/set.md @@ -8,4 +8,4 @@ 对于强制服务器重启,磁盘上的数据块可能会丢失或损坏。在数据块损坏的情况下,可能需要手动删除包含损坏数据的文件。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/set/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/set/) diff --git a/docs/zh/engines/table-engines/special/url.md b/docs/zh/engines/table-engines/special/url.md index 9e0b953043e..41dd887d20a 100644 --- a/docs/zh/engines/table-engines/special/url.md +++ b/docs/zh/engines/table-engines/special/url.md @@ -68,4 +68,4 @@ SELECT * FROM url_engine_table - 索引。 - 副本。 -[来源文章](https://clickhouse.tech/docs/en/operations/table_engines/url/) +[来源文章](https://clickhouse.com/docs/en/operations/table_engines/url/) diff --git a/docs/zh/engines/table-engines/special/view.md b/docs/zh/engines/table-engines/special/view.md index e2dca177e4e..fde72ce85b0 100644 --- a/docs/zh/engines/table-engines/special/view.md +++ b/docs/zh/engines/table-engines/special/view.md @@ -2,4 +2,4 @@ 用于构建视图(有关更多信息,请参阅 `CREATE VIEW 查询`)。 它不存储数据,仅存储指定的 `SELECT` 查询。 从表中读取时,它会运行此查询(并从查询中删除所有不必要的列)。 -[原始文章](https://clickhouse.tech/docs/en/operations/table_engines/view/) +[原始文章](https://clickhouse.com/docs/en/operations/table_engines/view/) diff --git a/docs/zh/faq/general.md b/docs/zh/faq/general.md index 68053330405..05dad567195 100644 --- a/docs/zh/faq/general.md +++ b/docs/zh/faq/general.md @@ -16,4 +16,4 @@ NLS_LANG=CHINESE_CHINA.ZHS16GBK -[来源文章](https://clickhouse.tech/docs/zh/faq/general/) +[来源文章](https://clickhouse.com/docs/zh/faq/general/) diff --git a/docs/zh/faq/general/columnar-database.md b/docs/zh/faq/general/columnar-database.md new file mode 120000 index 00000000000..b7557b62010 --- /dev/null +++ b/docs/zh/faq/general/columnar-database.md @@ -0,0 +1 @@ +../../../en/faq/general/columnar-database.md \ No newline at end of file diff --git a/docs/zh/faq/general/dbms-naming.md b/docs/zh/faq/general/dbms-naming.md new file mode 120000 index 00000000000..0df856af0ca --- /dev/null +++ b/docs/zh/faq/general/dbms-naming.md @@ -0,0 +1 @@ +../../../en/faq/general/dbms-naming.md \ No newline at end of file diff --git a/docs/zh/faq/general/index.md b/docs/zh/faq/general/index.md new file mode 120000 index 00000000000..5ff33ccb360 --- /dev/null +++ b/docs/zh/faq/general/index.md @@ -0,0 +1 @@ +../../../en/faq/general/index.md \ No newline at end of file diff --git a/docs/zh/faq/general/mapreduce.md b/docs/zh/faq/general/mapreduce.md new file mode 120000 index 00000000000..49b79ad4841 --- /dev/null +++ b/docs/zh/faq/general/mapreduce.md @@ -0,0 +1 @@ +../../../en/faq/general/mapreduce.md \ No newline at end of file diff --git a/docs/zh/faq/general/ne-tormozit.md b/docs/zh/faq/general/ne-tormozit.md new file mode 120000 index 00000000000..a8273c56b2d --- /dev/null +++ b/docs/zh/faq/general/ne-tormozit.md @@ -0,0 +1 @@ +../../../en/faq/general/ne-tormozit.md \ No newline at end of file diff --git a/docs/zh/faq/general/olap.md b/docs/zh/faq/general/olap.md new file mode 120000 index 00000000000..99caa8218c8 --- /dev/null +++ b/docs/zh/faq/general/olap.md @@ -0,0 +1 @@ +../../../en/faq/general/olap.md \ No newline at end of file diff --git a/docs/zh/faq/general/who-is-using-clickhouse.md b/docs/zh/faq/general/who-is-using-clickhouse.md new file mode 120000 index 00000000000..b4e9782df7e --- /dev/null +++ b/docs/zh/faq/general/who-is-using-clickhouse.md @@ -0,0 +1 @@ +../../../en/faq/general/who-is-using-clickhouse.md \ No newline at end of file diff --git a/docs/zh/faq/general/why-clickhouse-is-so-fast.md b/docs/zh/faq/general/why-clickhouse-is-so-fast.md new file mode 120000 index 00000000000..77b8c3fcd68 --- /dev/null +++ b/docs/zh/faq/general/why-clickhouse-is-so-fast.md @@ -0,0 +1 @@ +../../../en/faq/general/why-clickhouse-is-so-fast.md \ No newline at end of file diff --git a/docs/zh/faq/integration/file-export.md b/docs/zh/faq/integration/file-export.md new file mode 120000 index 00000000000..19a5c67148b --- /dev/null +++ b/docs/zh/faq/integration/file-export.md @@ -0,0 +1 @@ +../../../en/faq/integration/file-export.md \ No newline at end of file diff --git a/docs/zh/faq/integration/index.md b/docs/zh/faq/integration/index.md new file mode 120000 index 00000000000..8323d6218a3 --- /dev/null +++ b/docs/zh/faq/integration/index.md @@ -0,0 +1 @@ +../../../en/faq/integration/index.md \ No newline at end of file diff --git a/docs/zh/faq/integration/json-import.md b/docs/zh/faq/integration/json-import.md new file mode 120000 index 00000000000..e90f4386602 --- /dev/null +++ b/docs/zh/faq/integration/json-import.md @@ -0,0 +1 @@ +../../../en/faq/integration/json-import.md \ No newline at end of file diff --git a/docs/zh/faq/integration/oracle-odbc.md b/docs/zh/faq/integration/oracle-odbc.md new file mode 120000 index 00000000000..47fe6189ee3 --- /dev/null +++ b/docs/zh/faq/integration/oracle-odbc.md @@ -0,0 +1 @@ +../../../en/faq/integration/oracle-odbc.md \ No newline at end of file diff --git a/docs/zh/faq/operations/delete-old-data.md b/docs/zh/faq/operations/delete-old-data.md new file mode 120000 index 00000000000..aef26953cd3 --- /dev/null +++ b/docs/zh/faq/operations/delete-old-data.md @@ -0,0 +1 @@ +../../../en/faq/operations/delete-old-data.md \ No newline at end of file diff --git a/docs/zh/faq/operations/index.md b/docs/zh/faq/operations/index.md new file mode 120000 index 00000000000..fd141164fdc --- /dev/null +++ b/docs/zh/faq/operations/index.md @@ -0,0 +1 @@ +../../../en/faq/operations/index.md \ No newline at end of file diff --git a/docs/zh/faq/operations/production.md b/docs/zh/faq/operations/production.md new file mode 120000 index 00000000000..8203988975c --- /dev/null +++ b/docs/zh/faq/operations/production.md @@ -0,0 +1 @@ +../../../en/faq/operations/production.md \ No newline at end of file diff --git a/docs/zh/faq/use-cases/index.md b/docs/zh/faq/use-cases/index.md new file mode 120000 index 00000000000..cc545acb000 --- /dev/null +++ b/docs/zh/faq/use-cases/index.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/index.md \ No newline at end of file diff --git a/docs/zh/faq/use-cases/key-value.md b/docs/zh/faq/use-cases/key-value.md new file mode 120000 index 00000000000..63140458d12 --- /dev/null +++ b/docs/zh/faq/use-cases/key-value.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/key-value.md \ No newline at end of file diff --git a/docs/zh/faq/use-cases/time-series.md b/docs/zh/faq/use-cases/time-series.md new file mode 120000 index 00000000000..55cbcfc243f --- /dev/null +++ b/docs/zh/faq/use-cases/time-series.md @@ -0,0 +1 @@ +../../../en/faq/use-cases/time-series.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/amplab-benchmark.md b/docs/zh/getting-started/example-datasets/amplab-benchmark.md index 22f2735968b..0feb4f7c371 100644 --- a/docs/zh/getting-started/example-datasets/amplab-benchmark.md +++ b/docs/zh/getting-started/example-datasets/amplab-benchmark.md @@ -124,4 +124,4 @@ ORDER BY totalRevenue DESC LIMIT 1 ``` -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/amplab_benchmark/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/amplab_benchmark/) diff --git a/docs/zh/getting-started/example-datasets/brown-benchmark.md b/docs/zh/getting-started/example-datasets/brown-benchmark.md new file mode 120000 index 00000000000..1f6e2be14fa --- /dev/null +++ b/docs/zh/getting-started/example-datasets/brown-benchmark.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/brown-benchmark.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/cell-towers.md b/docs/zh/getting-started/example-datasets/cell-towers.md new file mode 120000 index 00000000000..899946803d1 --- /dev/null +++ b/docs/zh/getting-started/example-datasets/cell-towers.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/cell-towers.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/criteo.md b/docs/zh/getting-started/example-datasets/criteo.md index 40ca1b4a781..ecc643bc576 100644 --- a/docs/zh/getting-started/example-datasets/criteo.md +++ b/docs/zh/getting-started/example-datasets/criteo.md @@ -76,4 +76,4 @@ INSERT INTO criteo SELECT date, clicked, int1, int2, int3, int4, int5, int6, int DROP TABLE criteo_log; ``` -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/criteo/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/criteo/) diff --git a/docs/zh/getting-started/example-datasets/github-events.md b/docs/zh/getting-started/example-datasets/github-events.md new file mode 120000 index 00000000000..c9649c0a61f --- /dev/null +++ b/docs/zh/getting-started/example-datasets/github-events.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/github-events.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/index.md b/docs/zh/getting-started/example-datasets/index.md index acd554ca4da..e85796f6e96 100644 --- a/docs/zh/getting-started/example-datasets/index.md +++ b/docs/zh/getting-started/example-datasets/index.md @@ -18,4 +18,4 @@ toc_title: "\u5BFC\u8A00" - [New York Taxi Data](../../getting-started/example-datasets/nyc-taxi.md) - [OnTime](../../getting-started/example-datasets/ontime.md) -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets) diff --git a/docs/zh/getting-started/example-datasets/menus.md b/docs/zh/getting-started/example-datasets/menus.md new file mode 120000 index 00000000000..d82b3198962 --- /dev/null +++ b/docs/zh/getting-started/example-datasets/menus.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/menus.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/metrica.md b/docs/zh/getting-started/example-datasets/metrica.md index 62ba28a92ef..d91e8ce232c 100644 --- a/docs/zh/getting-started/example-datasets/metrica.md +++ b/docs/zh/getting-started/example-datasets/metrica.md @@ -7,14 +7,14 @@ toc_title: Yandex.Metrica Data 数据集由两个表组成,包含关于Yandex.Metrica的hits(`hits_v1`)和visit(`visits_v1`)的匿名数据。你可以阅读更多关于Yandex的信息。在[ClickHouse历史](../../introduction/history.md)的Metrica部分。 -数据集由两个表组成,他们中的任何一个都可以下载作为一个压缩`tsv.xz`的文件或准备的分区。除此之外,一个扩展版的`hits`表包含1亿行TSV在https://datasets.clickhouse.tech/hits/tsv/hits_100m_obfuscated_v1.tsv.xz,准备分区在https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz。 +数据集由两个表组成,他们中的任何一个都可以下载作为一个压缩`tsv.xz`的文件或准备的分区。除此之外,一个扩展版的`hits`表包含1亿行TSV在https://datasets.clickhouse.com/hits/tsv/hits_100m_obfuscated_v1.tsv.xz,准备分区在https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz。 ## 从准备好的分区获取表 {#obtaining-tables-from-prepared-partitions} 下载和导入`hits`表: ``` bash -curl -O https://datasets.clickhouse.tech/hits/partitions/hits_v1.tar +curl -O https://datasets.clickhouse.com/hits/partitions/hits_v1.tar tar xvf hits_v1.tar -C /var/lib/clickhouse # path to ClickHouse data directory # check permissions on unpacked data, fix if required sudo service clickhouse-server restart @@ -24,7 +24,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" 下载和导入`visits`表: ``` bash -curl -O https://datasets.clickhouse.tech/visits/partitions/visits_v1.tar +curl -O https://datasets.clickhouse.com/visits/partitions/visits_v1.tar tar xvf visits_v1.tar -C /var/lib/clickhouse # path to ClickHouse data directory # check permissions on unpacked data, fix if required sudo service clickhouse-server restart @@ -36,7 +36,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.visits_v1" 从TSV压缩文件下载并导入`hits`: ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv # now create table clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" clickhouse-client --query "CREATE TABLE datasets.hits_v1 ( WatchID UInt64, JavaEnable UInt8, Title String, GoodEvent Int16, EventTime DateTime, EventDate Date, CounterID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RegionID UInt32, UserID UInt64, CounterClass Int8, OS UInt8, UserAgent UInt8, URL String, Referer String, URLDomain String, RefererDomain String, Refresh UInt8, IsRobot UInt8, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), ResolutionWidth UInt16, ResolutionHeight UInt16, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, FlashMinor2 String, NetMajor UInt8, NetMinor UInt8, UserAgentMajor UInt16, UserAgentMinor FixedString(2), CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, MobilePhone UInt8, MobilePhoneModel String, Params String, IPNetworkID UInt32, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, IsArtifical UInt8, WindowClientWidth UInt16, WindowClientHeight UInt16, ClientTimeZone Int16, ClientEventTime DateTime, SilverlightVersion1 UInt8, SilverlightVersion2 UInt8, SilverlightVersion3 UInt32, SilverlightVersion4 UInt16, PageCharset String, CodeVersion UInt32, IsLink UInt8, IsDownload UInt8, IsNotBounce UInt8, FUniqID UInt64, HID UInt32, IsOldCounter UInt8, IsEvent UInt8, IsParameter UInt8, DontCountHits UInt8, WithHash UInt8, HitColor FixedString(1), UTCEventTime DateTime, Age UInt8, Sex UInt8, Income UInt8, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), RemoteIP UInt32, RemoteIP6 FixedString(16), WindowName Int32, OpenerName Int32, HistoryLength Int16, BrowserLanguage FixedString(2), BrowserCountry FixedString(2), SocialNetwork String, SocialAction String, HTTPError UInt16, SendTiming Int32, DNSTiming Int32, ConnectTiming Int32, ResponseStartTiming Int32, ResponseEndTiming Int32, FetchTiming Int32, RedirectTiming Int32, DOMInteractiveTiming Int32, DOMContentLoadedTiming Int32, DOMCompleteTiming Int32, LoadEventStartTiming Int32, LoadEventEndTiming Int32, NSToDOMContentLoadedTiming Int32, FirstPaintTiming Int32, RedirectCount Int8, SocialSourceNetworkID UInt8, SocialSourcePage String, ParamPrice Int64, ParamOrderID String, ParamCurrency FixedString(3), ParamCurrencyID UInt16, GoalsReached Array(UInt32), OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, RefererHash UInt64, URLHash UInt64, CLID UInt32, YCLID UInt64, ShareService String, ShareURL String, ShareTitle String, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), IslandID FixedString(16), RequestNum UInt32, RequestTry UInt8) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventDate) ORDER BY (CounterID, EventDate, intHash32(UserID)) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" @@ -50,7 +50,7 @@ clickhouse-client --query "SELECT COUNT(*) FROM datasets.hits_v1" 从压缩tsv文件下载和导入`visits`: ``` bash -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv # now create table clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets" clickhouse-client --query "CREATE TABLE datasets.visits_v1 ( CounterID UInt32, StartDate Date, Sign Int8, IsNew UInt8, VisitID UInt64, UserID UInt64, StartTime DateTime, Duration UInt32, UTCStartTime DateTime, PageViews Int32, Hits Int32, IsBounce UInt8, Referer String, StartURL String, RefererDomain String, StartURLDomain String, EndURL String, LinkURL String, IsDownload UInt8, TraficSourceID Int8, SearchEngineID UInt16, SearchPhrase String, AdvEngineID UInt8, PlaceID Int32, RefererCategories Array(UInt16), URLCategories Array(UInt16), URLRegions Array(UInt32), RefererRegions Array(UInt32), IsYandex UInt8, GoalReachesDepth Int32, GoalReachesURL Int32, GoalReachesAny Int32, SocialSourceNetworkID UInt8, SocialSourcePage String, MobilePhoneModel String, ClientEventTime DateTime, RegionID UInt32, ClientIP UInt32, ClientIP6 FixedString(16), RemoteIP UInt32, RemoteIP6 FixedString(16), IPNetworkID UInt32, SilverlightVersion3 UInt32, CodeVersion UInt32, ResolutionWidth UInt16, ResolutionHeight UInt16, UserAgentMajor UInt16, UserAgentMinor UInt16, WindowClientWidth UInt16, WindowClientHeight UInt16, SilverlightVersion2 UInt8, SilverlightVersion4 UInt16, FlashVersion3 UInt16, FlashVersion4 UInt16, ClientTimeZone Int16, OS UInt8, UserAgent UInt8, ResolutionDepth UInt8, FlashMajor UInt8, FlashMinor UInt8, NetMajor UInt8, NetMinor UInt8, MobilePhone UInt8, SilverlightVersion1 UInt8, Age UInt8, Sex UInt8, Income UInt8, JavaEnable UInt8, CookieEnable UInt8, JavascriptEnable UInt8, IsMobile UInt8, BrowserLanguage UInt16, BrowserCountry UInt16, Interests UInt16, Robotness UInt8, GeneralInterests Array(UInt16), Params Array(String), Goals Nested(ID UInt32, Serial UInt32, EventTime DateTime, Price Int64, OrderID String, CurrencyID UInt32), WatchIDs Array(UInt64), ParamSumPrice Int64, ParamCurrency FixedString(3), ParamCurrencyID UInt16, ClickLogID UInt64, ClickEventID Int32, ClickGoodEvent Int32, ClickEventTime DateTime, ClickPriorityID Int32, ClickPhraseID Int32, ClickPageID Int32, ClickPlaceID Int32, ClickTypeID Int32, ClickResourceID Int32, ClickCost UInt32, ClickClientIP UInt32, ClickDomainID UInt32, ClickURL String, ClickAttempt UInt8, ClickOrderID UInt32, ClickBannerID UInt32, ClickMarketCategoryID UInt32, ClickMarketPP UInt32, ClickMarketCategoryName String, ClickMarketPPName String, ClickAWAPSCampaignName String, ClickPageName String, ClickTargetType UInt16, ClickTargetPhraseID UInt64, ClickContextType UInt8, ClickSelectType Int8, ClickOptions String, ClickGroupBannerID Int32, OpenstatServiceName String, OpenstatCampaignID String, OpenstatAdID String, OpenstatSourceID String, UTMSource String, UTMMedium String, UTMCampaign String, UTMContent String, UTMTerm String, FromTag String, HasGCLID UInt8, FirstVisit DateTime, PredLastVisit Date, LastVisit Date, TotalVisits UInt32, TraficSource Nested(ID Int8, SearchEngineID UInt16, AdvEngineID UInt8, PlaceID UInt16, SocialSourceNetworkID UInt8, Domain String, SearchPhrase String, SocialSourcePage String), Attendance FixedString(16), CLID UInt32, YCLID UInt64, NormalizedRefererHash UInt64, SearchPhraseHash UInt64, RefererDomainHash UInt64, NormalizedStartURLHash UInt64, StartURLDomainHash UInt64, NormalizedEndURLHash UInt64, TopLevelDomain UInt64, URLScheme UInt64, OpenstatServiceNameHash UInt64, OpenstatCampaignIDHash UInt64, OpenstatAdIDHash UInt64, OpenstatSourceIDHash UInt64, UTMSourceHash UInt64, UTMMediumHash UInt64, UTMCampaignHash UInt64, UTMContentHash UInt64, UTMTermHash UInt64, FromHash UInt64, WebVisorEnabled UInt8, WebVisorActivity UInt32, ParsedParams Nested(Key1 String, Key2 String, Key3 String, Key4 String, Key5 String, ValueDouble Float64), Market Nested(Type UInt8, GoalID UInt32, OrderID String, OrderPrice Int64, PP UInt32, DirectPlaceID UInt32, DirectOrderID UInt32, DirectBannerID UInt32, GoodID String, GoodName String, GoodQuantity Int32, GoodPrice Int64), IslandID FixedString(16)) ENGINE = CollapsingMergeTree(Sign) PARTITION BY toYYYYMM(StartDate) ORDER BY (CounterID, StartDate, intHash32(UserID), VisitID) SAMPLE BY intHash32(UserID) SETTINGS index_granularity = 8192" diff --git a/docs/zh/getting-started/example-datasets/nyc-taxi.md b/docs/zh/getting-started/example-datasets/nyc-taxi.md index 0e4ff67d6e7..b10fe931c20 100644 --- a/docs/zh/getting-started/example-datasets/nyc-taxi.md +++ b/docs/zh/getting-started/example-datasets/nyc-taxi.md @@ -283,7 +283,7 @@ SELECT formatReadableSize(sum(bytes)) FROM system.parts WHERE table = 'trips_mer ## 下载预处理好的分区数据 {#xia-zai-yu-chu-li-hao-de-fen-qu-shu-ju} ``` bash -$ curl -O https://datasets.clickhouse.tech/trips_mergetree/partitions/trips_mergetree.tar +$ curl -O https://datasets.clickhouse.com/trips_mergetree/partitions/trips_mergetree.tar $ tar xvf trips_mergetree.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -385,4 +385,4 @@ Q4:0.072秒。 | 3 | 0.212 | 0.438 | 0.733 | 1.241 | | 140 | 0.028 | 0.043 | 0.051 | 0.072 | -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/nyc_taxi/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/nyc_taxi/) diff --git a/docs/zh/getting-started/example-datasets/ontime.md b/docs/zh/getting-started/example-datasets/ontime.md index 6d888b2196c..03a9a8c4278 100644 --- a/docs/zh/getting-started/example-datasets/ontime.md +++ b/docs/zh/getting-started/example-datasets/ontime.md @@ -155,7 +155,7 @@ ls -1 *.zip | xargs -I{} -P $(nproc) bash -c "echo {}; unzip -cq {} '*.csv' | se ## 下载预处理好的分区数据 {#xia-zai-yu-chu-li-hao-de-fen-qu-shu-ju} ``` bash -$ curl -O https://datasets.clickhouse.tech/ontime/partitions/ontime.tar +$ curl -O https://datasets.clickhouse.com/ontime/partitions/ontime.tar $ tar xvf ontime.tar -C /var/lib/clickhouse # path to ClickHouse data directory $ # check permissions of unpacked data, fix if required $ sudo service clickhouse-server restart @@ -408,4 +408,4 @@ LIMIT 10; - https://www.percona.com/blog/2016/01/07/apache-spark-with-air-ontime-performance-data/ - http://nickmakos.blogspot.ru/2012/08/analyzing-air-traffic-performance-with.html -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/ontime/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/ontime/) diff --git a/docs/zh/getting-started/example-datasets/opensky.md b/docs/zh/getting-started/example-datasets/opensky.md new file mode 120000 index 00000000000..4305c0cac3c --- /dev/null +++ b/docs/zh/getting-started/example-datasets/opensky.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/opensky.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/recipes.md b/docs/zh/getting-started/example-datasets/recipes.md new file mode 120000 index 00000000000..4fdaa5de5b8 --- /dev/null +++ b/docs/zh/getting-started/example-datasets/recipes.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/recipes.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/star-schema.md b/docs/zh/getting-started/example-datasets/star-schema.md index fcb6e90c694..aa2c259d6ad 100644 --- a/docs/zh/getting-started/example-datasets/star-schema.md +++ b/docs/zh/getting-started/example-datasets/star-schema.md @@ -7,7 +7,7 @@ toc_title: Star Schema Benchmark 编译 dbgen: -``` bash +```bash $ git clone git@github.com:vadimtk/ssb-dbgen.git $ cd ssb-dbgen $ make @@ -16,9 +16,9 @@ $ make 开始生成数据: !!! warning "注意" - 使用`-s 100`dbgen将生成6亿行数据(67GB), 如果使用`-s 1000`它会生成60亿行数据(这需要很多时间)) +使用`-s 100`dbgen 将生成 6 亿行数据(67GB), 如果使用`-s 1000`它会生成 60 亿行数据(这需要很多时间)) -``` bash +```bash $ ./dbgen -s 1000 -T c $ ./dbgen -s 1000 -T l $ ./dbgen -s 1000 -T p @@ -26,9 +26,9 @@ $ ./dbgen -s 1000 -T s $ ./dbgen -s 1000 -T d ``` -在ClickHouse中创建数据表: +在 ClickHouse 中创建数据表: -``` sql +```sql CREATE TABLE customer ( C_CUSTKEY UInt32, @@ -93,7 +93,7 @@ ENGINE = MergeTree ORDER BY S_SUPPKEY; 写入数据: -``` bash +```bash $ clickhouse-client --query "INSERT INTO customer FORMAT CSV" < customer.tbl $ clickhouse-client --query "INSERT INTO part FORMAT CSV" < part.tbl $ clickhouse-client --query "INSERT INTO supplier FORMAT CSV" < supplier.tbl @@ -102,100 +102,267 @@ $ clickhouse-client --query "INSERT INTO lineorder FORMAT CSV" < lineorder.tbl 将`star schema`转换为`flat schema`: -``` sql -SET max_memory_usage = 20000000000, allow_experimental_multiple_joins_emulation = 1; +```sql +SET max_memory_usage = 20000000000; CREATE TABLE lineorder_flat ENGINE = MergeTree PARTITION BY toYear(LO_ORDERDATE) ORDER BY (LO_ORDERDATE, LO_ORDERKEY) AS -SELECT l.*, c.*, s.*, p.* -FROM lineorder l - ANY INNER JOIN customer c ON (c.C_CUSTKEY = l.LO_CUSTKEY) - ANY INNER JOIN supplier s ON (s.S_SUPPKEY = l.LO_SUPPKEY) - ANY INNER JOIN part p ON (p.P_PARTKEY = l.LO_PARTKEY); - -ALTER TABLE lineorder_flat DROP COLUMN C_CUSTKEY, DROP COLUMN S_SUPPKEY, DROP COLUMN P_PARTKEY; +SELECT + l.LO_ORDERKEY AS LO_ORDERKEY, + l.LO_LINENUMBER AS LO_LINENUMBER, + l.LO_CUSTKEY AS LO_CUSTKEY, + l.LO_PARTKEY AS LO_PARTKEY, + l.LO_SUPPKEY AS LO_SUPPKEY, + l.LO_ORDERDATE AS LO_ORDERDATE, + l.LO_ORDERPRIORITY AS LO_ORDERPRIORITY, + l.LO_SHIPPRIORITY AS LO_SHIPPRIORITY, + l.LO_QUANTITY AS LO_QUANTITY, + l.LO_EXTENDEDPRICE AS LO_EXTENDEDPRICE, + l.LO_ORDTOTALPRICE AS LO_ORDTOTALPRICE, + l.LO_DISCOUNT AS LO_DISCOUNT, + l.LO_REVENUE AS LO_REVENUE, + l.LO_SUPPLYCOST AS LO_SUPPLYCOST, + l.LO_TAX AS LO_TAX, + l.LO_COMMITDATE AS LO_COMMITDATE, + l.LO_SHIPMODE AS LO_SHIPMODE, + c.C_NAME AS C_NAME, + c.C_ADDRESS AS C_ADDRESS, + c.C_CITY AS C_CITY, + c.C_NATION AS C_NATION, + c.C_REGION AS C_REGION, + c.C_PHONE AS C_PHONE, + c.C_MKTSEGMENT AS C_MKTSEGMENT, + s.S_NAME AS S_NAME, + s.S_ADDRESS AS S_ADDRESS, + s.S_CITY AS S_CITY, + s.S_NATION AS S_NATION, + s.S_REGION AS S_REGION, + s.S_PHONE AS S_PHONE, + p.P_NAME AS P_NAME, + p.P_MFGR AS P_MFGR, + p.P_CATEGORY AS P_CATEGORY, + p.P_BRAND AS P_BRAND, + p.P_COLOR AS P_COLOR, + p.P_TYPE AS P_TYPE, + p.P_SIZE AS P_SIZE, + p.P_CONTAINER AS P_CONTAINER +FROM lineorder AS l +INNER JOIN customer AS c ON c.C_CUSTKEY = l.LO_CUSTKEY +INNER JOIN supplier AS s ON s.S_SUPPKEY = l.LO_SUPPKEY +INNER JOIN part AS p ON p.P_PARTKEY = l.LO_PARTKEY; ``` 运行查询: Q1.1 -``` sql -SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue FROM lineorder_flat WHERE toYear(LO_ORDERDATE) = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY < 25; +```sql +SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM lineorder_flat +WHERE toYear(LO_ORDERDATE) = 1993 AND LO_DISCOUNT BETWEEN 1 AND 3 AND LO_QUANTITY < 25; ``` Q1.2 -``` sql -SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue FROM lineorder_flat WHERE toYYYYMM(LO_ORDERDATE) = 199401 AND LO_DISCOUNT BETWEEN 4 AND 6 AND LO_QUANTITY BETWEEN 26 AND 35; +```sql +SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM lineorder_flat +WHERE toYYYYMM(LO_ORDERDATE) = 199401 AND LO_DISCOUNT BETWEEN 4 AND 6 AND LO_QUANTITY BETWEEN 26 AND 35; ``` Q1.3 -``` sql -SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue FROM lineorder_flat WHERE toISOWeek(LO_ORDERDATE) = 6 AND toYear(LO_ORDERDATE) = 1994 AND LO_DISCOUNT BETWEEN 5 AND 7 AND LO_QUANTITY BETWEEN 26 AND 35; +```sql +SELECT sum(LO_EXTENDEDPRICE * LO_DISCOUNT) AS revenue +FROM lineorder_flat +WHERE toISOWeek(LO_ORDERDATE) = 6 AND toYear(LO_ORDERDATE) = 1994 + AND LO_DISCOUNT BETWEEN 5 AND 7 AND LO_QUANTITY BETWEEN 26 AND 35; ``` Q2.1 -``` sql -SELECT sum(LO_REVENUE), toYear(LO_ORDERDATE) AS year, P_BRAND FROM lineorder_flat WHERE P_CATEGORY = 'MFGR#12' AND S_REGION = 'AMERICA' GROUP BY year, P_BRAND ORDER BY year, P_BRAND; +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE P_CATEGORY = 'MFGR#12' AND S_REGION = 'AMERICA' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; ``` Q2.2 -``` sql -SELECT sum(LO_REVENUE), toYear(LO_ORDERDATE) AS year, P_BRAND FROM lineorder_flat WHERE P_BRAND BETWEEN 'MFGR#2221' AND 'MFGR#2228' AND S_REGION = 'ASIA' GROUP BY year, P_BRAND ORDER BY year, P_BRAND; +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE P_BRAND >= 'MFGR#2221' AND P_BRAND <= 'MFGR#2228' AND S_REGION = 'ASIA' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; ``` Q2.3 -``` sql -SELECT sum(LO_REVENUE), toYear(LO_ORDERDATE) AS year, P_BRAND FROM lineorder_flat WHERE P_BRAND = 'MFGR#2239' AND S_REGION = 'EUROPE' GROUP BY year, P_BRAND ORDER BY year, P_BRAND; +```sql +SELECT + sum(LO_REVENUE), + toYear(LO_ORDERDATE) AS year, + P_BRAND +FROM lineorder_flat +WHERE P_BRAND = 'MFGR#2239' AND S_REGION = 'EUROPE' +GROUP BY + year, + P_BRAND +ORDER BY + year, + P_BRAND; ``` Q3.1 -``` sql -SELECT C_NATION, S_NATION, toYear(LO_ORDERDATE) AS year, sum(LO_REVENUE) AS revenue FROM lineorder_flat WHERE C_REGION = 'ASIA' AND S_REGION = 'ASIA' AND year >= 1992 AND year <= 1997 GROUP BY C_NATION, S_NATION, year ORDER BY year asc, revenue desc; +```sql +SELECT + C_NATION, + S_NATION, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE C_REGION = 'ASIA' AND S_REGION = 'ASIA' AND year >= 1992 AND year <= 1997 +GROUP BY + C_NATION, + S_NATION, + year +ORDER BY + year ASC, + revenue DESC; ``` Q3.2 -``` sql -SELECT C_CITY, S_CITY, toYear(LO_ORDERDATE) AS year, sum(LO_REVENUE) AS revenue FROM lineorder_flat WHERE C_NATION = 'UNITED STATES' AND S_NATION = 'UNITED STATES' AND year >= 1992 AND year <= 1997 GROUP BY C_CITY, S_CITY, year ORDER BY year asc, revenue desc; +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE C_NATION = 'UNITED STATES' AND S_NATION = 'UNITED STATES' AND year >= 1992 AND year <= 1997 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; ``` Q3.3 -``` sql -SELECT C_CITY, S_CITY, toYear(LO_ORDERDATE) AS year, sum(LO_REVENUE) AS revenue FROM lineorder_flat WHERE (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') AND year >= 1992 AND year <= 1997 GROUP BY C_CITY, S_CITY, year ORDER BY year asc, revenue desc; +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') AND year >= 1992 AND year <= 1997 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; ``` Q3.4 -``` sql -SELECT C_CITY, S_CITY, toYear(LO_ORDERDATE) AS year, sum(LO_REVENUE) AS revenue FROM lineorder_flat WHERE (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') AND toYYYYMM(LO_ORDERDATE) = '199712' GROUP BY C_CITY, S_CITY, year ORDER BY year asc, revenue desc; +```sql +SELECT + C_CITY, + S_CITY, + toYear(LO_ORDERDATE) AS year, + sum(LO_REVENUE) AS revenue +FROM lineorder_flat +WHERE (C_CITY = 'UNITED KI1' OR C_CITY = 'UNITED KI5') AND (S_CITY = 'UNITED KI1' OR S_CITY = 'UNITED KI5') AND toYYYYMM(LO_ORDERDATE) = 199712 +GROUP BY + C_CITY, + S_CITY, + year +ORDER BY + year ASC, + revenue DESC; ``` Q4.1 -``` sql -SELECT toYear(LO_ORDERDATE) AS year, C_NATION, sum(LO_REVENUE - LO_SUPPLYCOST) AS profit FROM lineorder_flat WHERE C_REGION = 'AMERICA' AND S_REGION = 'AMERICA' AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') GROUP BY year, C_NATION ORDER BY year, C_NATION; +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + C_NATION, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM lineorder_flat +WHERE C_REGION = 'AMERICA' AND S_REGION = 'AMERICA' AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + year, + C_NATION +ORDER BY + year ASC, + C_NATION ASC; ``` Q4.2 -``` sql -SELECT toYear(LO_ORDERDATE) AS year, S_NATION, P_CATEGORY, sum(LO_REVENUE - LO_SUPPLYCOST) AS profit FROM lineorder_flat WHERE C_REGION = 'AMERICA' AND S_REGION = 'AMERICA' AND (year = 1997 OR year = 1998) AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') GROUP BY year, S_NATION, P_CATEGORY ORDER BY year, S_NATION, P_CATEGORY; +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + S_NATION, + P_CATEGORY, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM lineorder_flat +WHERE C_REGION = 'AMERICA' AND S_REGION = 'AMERICA' AND (year = 1997 OR year = 1998) AND (P_MFGR = 'MFGR#1' OR P_MFGR = 'MFGR#2') +GROUP BY + year, + S_NATION, + P_CATEGORY +ORDER BY + year ASC, + S_NATION ASC, + P_CATEGORY ASC; ``` Q4.3 -``` sql -SELECT toYear(LO_ORDERDATE) AS year, S_CITY, P_BRAND, sum(LO_REVENUE - LO_SUPPLYCOST) AS profit FROM lineorder_flat WHERE S_NATION = 'UNITED STATES' AND (year = 1997 OR year = 1998) AND P_CATEGORY = 'MFGR#14' GROUP BY year, S_CITY, P_BRAND ORDER BY year, S_CITY, P_BRAND; +```sql +SELECT + toYear(LO_ORDERDATE) AS year, + S_CITY, + P_BRAND, + sum(LO_REVENUE - LO_SUPPLYCOST) AS profit +FROM lineorder_flat +WHERE S_NATION = 'UNITED STATES' AND (year = 1997 OR year = 1998) AND P_CATEGORY = 'MFGR#14' +GROUP BY + year, + S_CITY, + P_BRAND +ORDER BY + year ASC, + S_CITY ASC, + P_BRAND ASC; ``` -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/star_schema/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/star_schema/) diff --git a/docs/zh/getting-started/example-datasets/uk-price-paid.md b/docs/zh/getting-started/example-datasets/uk-price-paid.md new file mode 120000 index 00000000000..e48bcf21d7b --- /dev/null +++ b/docs/zh/getting-started/example-datasets/uk-price-paid.md @@ -0,0 +1 @@ +../../../en/getting-started/example-datasets/uk-price-paid.md \ No newline at end of file diff --git a/docs/zh/getting-started/example-datasets/wikistat.md b/docs/zh/getting-started/example-datasets/wikistat.md index 4320d6b4926..b91b254fcf5 100644 --- a/docs/zh/getting-started/example-datasets/wikistat.md +++ b/docs/zh/getting-started/example-datasets/wikistat.md @@ -30,4 +30,4 @@ $ cat links.txt | while read link; do wget http://dumps.wikimedia.org/other/page $ ls -1 /opt/wikistat/ | grep gz | while read i; do echo $i; gzip -cd /opt/wikistat/$i | ./wikistat-loader --time="$(echo -n $i | sed -r 's/pagecounts-([0-9]{4})([0-9]{2})([0-9]{2})-([0-9]{2})([0-9]{2})([0-9]{2})\.gz/\1-\2-\3 \4-00-00/')" | clickhouse-client --query="INSERT INTO wikistat FORMAT TabSeparated"; done ``` -[原始文章](https://clickhouse.tech/docs/en/getting_started/example_datasets/wikistat/) +[原始文章](https://clickhouse.com/docs/en/getting_started/example_datasets/wikistat/) diff --git a/docs/zh/getting-started/index.md b/docs/zh/getting-started/index.md index c5ec7ded932..f5ce4cbf3b7 100644 --- a/docs/zh/getting-started/index.md +++ b/docs/zh/getting-started/index.md @@ -15,4 +15,4 @@ toc_priority: 2 - [示例数据集-航班飞行数据](example-datasets/ontime.md) 示例数据,提供了常用的SQL查询场景 -[来源文章](https://clickhouse.tech/docs/zh/getting_started/) +[来源文章](https://clickhouse.com/docs/zh/getting_started/) diff --git a/docs/zh/getting-started/install.md b/docs/zh/getting-started/install.md index 51d6ed198fa..1bf8ecd9826 100644 --- a/docs/zh/getting-started/install.md +++ b/docs/zh/getting-started/install.md @@ -29,7 +29,7 @@ $ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not 如果您想使用最新的版本,请用`testing`替代`stable`(我们只推荐您用于测试环境)。 -你也可以从这里手动下载安装包:[下载](https://repo.clickhouse.tech/deb/stable/main/)。 +你也可以从这里手动下载安装包:[下载](https://repo.clickhouse.com/deb/stable/main/)。 安装包列表: @@ -46,8 +46,8 @@ $ grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not ``` bash sudo yum install yum-utils -sudo rpm --import https://repo.clickhouse.tech/CLICKHOUSE-KEY.GPG -sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_64 +sudo rpm --import https://repo.clickhouse.com/CLICKHOUSE-KEY.GPG +sudo yum-config-manager --add-repo https://repo.clickhouse.com/rpm/stable/x86_64 ``` 如果您想使用最新的版本,请用`testing`替代`stable`(我们只推荐您用于测试环境)。`prestable`有时也可用。 @@ -58,22 +58,22 @@ sudo yum-config-manager --add-repo https://repo.clickhouse.tech/rpm/stable/x86_6 sudo yum install clickhouse-server clickhouse-client ``` -你也可以从这里手动下载安装包:[下载](https://repo.clickhouse.tech/rpm/stable/x86_64)。 +你也可以从这里手动下载安装包:[下载](https://repo.clickhouse.com/rpm/stable/x86_64)。 ### `Tgz`安装包 {#from-tgz-archives} 如果您的操作系统不支持安装`deb`或`rpm`包,建议使用官方预编译的`tgz`软件包。 -所需的版本可以通过`curl`或`wget`从存储库`https://repo.clickhouse.tech/tgz/`下载。 +所需的版本可以通过`curl`或`wget`从存储库`https://repo.clickhouse.com/tgz/`下载。 下载后解压缩下载资源文件并使用安装脚本进行安装。以下是一个最新版本的安装示例: ``` bash export LATEST_VERSION=`curl https://api.github.com/repos/ClickHouse/ClickHouse/tags 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | head -n 1` -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-server-$LATEST_VERSION.tgz -curl -O https://repo.clickhouse.tech/tgz/clickhouse-client-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-common-static-dbg-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-server-$LATEST_VERSION.tgz +curl -O https://repo.clickhouse.com/tgz/clickhouse-client-$LATEST_VERSION.tgz tar -xzvf clickhouse-common-static-$LATEST_VERSION.tgz sudo clickhouse-common-static-$LATEST_VERSION/install/doinst.sh @@ -93,15 +93,15 @@ sudo clickhouse-client-$LATEST_VERSION/install/doinst.sh ### `Docker`安装包 {#from-docker-image} -要在Docker中运行ClickHouse,请遵循[Docker Hub](https://hub.docker.com/r/yandex/clickhouse-server/)上的指南。它是官方的`deb`安装包。 +要在Docker中运行ClickHouse,请遵循[Docker Hub](https://hub.docker.com/r/clickhouse/clickhouse-server/)上的指南。它是官方的`deb`安装包。 ### 其他环境安装包 {#from-other} 对于非linux操作系统和Arch64 CPU架构,ClickHouse将会以`master`分支的最新提交的进行编译提供(它将会有几小时的延迟)。 -- [macOS](https://builds.clickhouse.tech/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/macos/clickhouse' && chmod a+x ./clickhouse` -- [FreeBSD](https://builds.clickhouse.tech/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/freebsd/clickhouse' && chmod a+x ./clickhouse` -- [AArch64](https://builds.clickhouse.tech/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.tech/master/aarch64/clickhouse' && chmod a+x ./clickhouse` +- [macOS](https://builds.clickhouse.com/master/macos/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/macos/clickhouse' && chmod a+x ./clickhouse` +- [FreeBSD](https://builds.clickhouse.com/master/freebsd/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/freebsd/clickhouse' && chmod a+x ./clickhouse` +- [AArch64](https://builds.clickhouse.com/master/aarch64/clickhouse) — `curl -O 'https://builds.clickhouse.com/master/aarch64/clickhouse' && chmod a+x ./clickhouse` 下载后,您可以使用`clickhouse client`连接服务,或者使用`clickhouse local`模式处理数据,不过您必须要额外在GitHub下载[server](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/config.xml)和[users](https://github.com/ClickHouse/ClickHouse/blob/master/programs/server/users.xml)配置文件。 @@ -183,6 +183,6 @@ SELECT 1 **恭喜,系统已经工作了!** -为了继续进行实验,你可以尝试下载测试数据集或查看[教程](https://clickhouse.tech/tutorial.html)。 +为了继续进行实验,你可以尝试下载测试数据集或查看[教程](https://clickhouse.com/tutorial.html)。 -[原始文章](https://clickhouse.tech/docs/en/getting_started/install/) +[原始文章](https://clickhouse.com/docs/en/getting_started/install/) diff --git a/docs/zh/getting-started/playground.md b/docs/zh/getting-started/playground.md index f7ab0ac0013..8fee8966a4f 100644 --- a/docs/zh/getting-started/playground.md +++ b/docs/zh/getting-started/playground.md @@ -5,7 +5,7 @@ toc_title: 体验平台 # ClickHouse体验平台 {#clickhouse-playground} -[ClickHouse体验平台](https://play.clickhouse.tech?file=welcome) 允许人们通过即时运行查询来尝试ClickHouse,而无需设置他们的服务器或集群。 +[ClickHouse体验平台](https://play.clickhouse.com?file=welcome) 允许人们通过即时运行查询来尝试ClickHouse,而无需设置他们的服务器或集群。 体验平台中提供几个示例数据集以及显示ClickHouse特性的示例查询。还有一些ClickHouse LTS版本可供尝试。 @@ -17,15 +17,15 @@ ClickHouse体验平台提供了小型集群[Managed Service for ClickHouse](http | 参数 | 值 | |:--------------------|:----------------------------------------| -| HTTPS端点 | `https://play-api.clickhouse.tech:8443` | -| TCP端点 | `play-api.clickhouse.tech:9440` | +| HTTPS端点 | `https://play-api.clickhouse.com:8443` | +| TCP端点 | `play-api.clickhouse.com:9440` | | 用户 | `playground` | | 密码 | `clickhouse` | 还有一些带有特定ClickHouse版本的附加信息来试验它们之间的差异(端口和用户/密码与上面相同): -- 20.3 LTS: `play-api-v20-3.clickhouse.tech` -- 19.14 LTS: `play-api-v19-14.clickhouse.tech` +- 20.3 LTS: `play-api-v20-3.clickhouse.com` +- 19.14 LTS: `play-api-v19-14.clickhouse.com` !!! note "注意" 所有这些端点都需要安全的TLS连接。 @@ -53,13 +53,13 @@ ClickHouse体验还有如下: 使用`curl`连接Https服务: ``` bash -curl "https://play-api.clickhouse.tech:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" +curl "https://play-api.clickhouse.com:8443/?query=SELECT+'Play+ClickHouse\!';&user=playground&password=clickhouse&database=datasets" ``` TCP连接示例[CLI](../interfaces/cli.md): ``` bash -clickhouse client --secure -h play-api.clickhouse.tech --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" +clickhouse client --secure -h play-api.clickhouse.com --port 9440 -u playground --password clickhouse -q "SELECT 'Play ClickHouse\!'" ``` ## Implementation Details {#implementation-details} diff --git a/docs/zh/getting-started/tutorial.md b/docs/zh/getting-started/tutorial.md index 4b1427cad2a..7189938f205 100644 --- a/docs/zh/getting-started/tutorial.md +++ b/docs/zh/getting-started/tutorial.md @@ -85,8 +85,8 @@ clickhouse-client --query='INSERT INTO table FORMAT TabSeparated' < data.tsv ### 下载并提取表数据 {#download-and-extract-table-data} ``` bash -curl https://datasets.clickhouse.tech/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv -curl https://datasets.clickhouse.tech/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv +curl https://datasets.clickhouse.com/hits/tsv/hits_v1.tsv.xz | unxz --threads=`nproc` > hits_v1.tsv +curl https://datasets.clickhouse.com/visits/tsv/visits_v1.tsv.xz | unxz --threads=`nproc` > visits_v1.tsv ``` 提取的文件大小约为10GB。 @@ -520,7 +520,7 @@ WHERE (CounterID = 912887) AND (toYYYYMM(StartDate) = 201403) AND (domain(StartU ClickHouse集群是一个同质集群。 设置步骤: 1. 在群集的所有机器上安装ClickHouse服务端 -2. 在配置文件中设置群集配置 +2. 在配置文件中设置集群配置 3. 在每个实例上创建本地表 4. 创建一个[分布式表](../engines/table-engines/special/distributed.md) @@ -659,4 +659,4 @@ INSERT INTO tutorial.hits_replica SELECT * FROM tutorial.hits_local; 复制在多主机模式下运行。数据可以加载到任何副本中,然后系统自动将其与其他实例同步。复制是异步的,因此在给定时刻,并非所有副本都可能包含最近插入的数据。至少应该有一个副本允许数据摄入。另一些则会在重新激活后同步数据并修复一致性。请注意,这种方法允许最近插入的数据丢失的可能性很低。 -[原始文章](https://clickhouse.tech/docs/en/getting_started/tutorial/) +[原始文章](https://clickhouse.com/docs/en/getting_started/tutorial/) diff --git a/docs/zh/guides/apply-catboost-model.md b/docs/zh/guides/apply-catboost-model.md index ad325dc29db..72f5fa38e84 100644 --- a/docs/zh/guides/apply-catboost-model.md +++ b/docs/zh/guides/apply-catboost-model.md @@ -240,4 +240,4 @@ FROM !!! note "注" 查看函数说明 [avg()](../sql-reference/aggregate-functions/reference/avg.md#agg_function-avg) 和 [log()](../sql-reference/functions/math-functions.md) 。 -[原始文章](https://clickhouse.tech/docs/en/guides/apply_catboost_model/) +[原始文章](https://clickhouse.com/docs/en/guides/apply_catboost_model/) diff --git a/docs/zh/guides/index.md b/docs/zh/guides/index.md index 54cb4e1055c..b8b4e7e2d51 100644 --- a/docs/zh/guides/index.md +++ b/docs/zh/guides/index.md @@ -13,4 +13,4 @@ toc_title: "\u6982\u8FF0" - [关于简单集群设置的教程](../getting-started/tutorial.md) - [在ClickHouse中应用CatBoost模型](apply-catboost-model.md) -[原始文章](https://clickhouse.tech/docs/en/guides/) +[原始文章](https://clickhouse.com/docs/en/guides/) diff --git a/docs/zh/index.md b/docs/zh/index.md index fb473020f22..8f545b49f13 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -87,4 +87,4 @@ ClickHouse是一个用于联机分析(OLAP)的列式数据库管理系统(DBMS) 请注意,为了提高CPU效率,查询语言必须是声明型的(SQL或MDX), 或者至少一个向量(J,K)。 查询应该只包含隐式循环,允许进行优化。 -[来源文章](https://clickhouse.tech/docs/zh/) +[来源文章](https://clickhouse.com/docs/zh/) diff --git a/docs/zh/interfaces/cli.md b/docs/zh/interfaces/cli.md index 3e15e8547cc..f4ae48cd425 100644 --- a/docs/zh/interfaces/cli.md +++ b/docs/zh/interfaces/cli.md @@ -147,4 +147,4 @@ $ clickhouse-client --param_tuple_in_tuple="(10, ('dt', 10))" -q "SELECT * FROM ``` -[来源文章](https://clickhouse.tech/docs/zh/interfaces/cli/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/cli/) diff --git a/docs/zh/interfaces/cpp.md b/docs/zh/interfaces/cpp.md index 5c88442c2ec..5fd2bc00b67 100644 --- a/docs/zh/interfaces/cpp.md +++ b/docs/zh/interfaces/cpp.md @@ -7,4 +7,4 @@ toc_title: C++客户端库 请参考仓库的描述文件[clickhouse-cpp](https://github.com/ClickHouse/clickhouse-cpp)。 -[原始文章](https://clickhouse.tech/docs/zh/interfaces/cpp/) +[原始文章](https://clickhouse.com/docs/zh/interfaces/cpp/) diff --git a/docs/zh/interfaces/formats.md b/docs/zh/interfaces/formats.md index 1cd91690e57..85af2abda6b 100644 --- a/docs/zh/interfaces/formats.md +++ b/docs/zh/interfaces/formats.md @@ -23,20 +23,19 @@ ClickHouse可以接受和返回各种格式的数据。受支持的输入格式 | [CustomSeparated](#format-customseparated) | ✔ | ✔ | | [Values](#data-format-values) | ✔ | ✔ | | [Vertical](#vertical) | ✗ | ✔ | -| [VerticalRaw](#verticalraw) | ✗ | ✔ | | [JSON](#json) | ✗ | ✔ | | [JSONAsString](#jsonasstring) | ✔ | ✗ | -| [JSONString](#jsonstring) | ✗ | ✔ | +| [JSONStrings](#jsonstrings) | ✗ | ✔ | | [JSONCompact](#jsoncompact) | ✗ | ✔ | -| [JSONCompactString](#jsoncompactstring) | ✗ | ✔ | +| [JSONCompactStrings](#jsoncompactstrings) | ✗ | ✔ | | [JSONEachRow](#jsoneachrow) | ✔ | ✔ | | [JSONEachRowWithProgress](#jsoneachrowwithprogress) | ✗ | ✔ | | [JSONStringsEachRow](#jsonstringseachrow) | ✔ | ✔ | | [JSONStringsEachRowWithProgress](#jsonstringseachrowwithprogress) | ✗ | ✔ | | [JSONCompactEachRow](#jsoncompacteachrow) | ✔ | ✔ | | [JSONCompactEachRowWithNamesAndTypes](#jsoncompacteachrowwithnamesandtypes) | ✔ | ✔ | -| [JSONCompactStringEachRow](#jsoncompactstringeachrow) | ✔ | ✔ | -| [JSONCompactStringEachRowWithNamesAndTypes](#jsoncompactstringeachrowwithnamesandtypes) | ✔ | ✔ | +| [JSONCompactStringsEachRow](#jsoncompactstringseachrow) | ✔ | ✔ | +| [JSONCompactStringsEachRowWithNamesAndTypes](#jsoncompactstringseachrowwithnamesandtypes) | ✔ | ✔ | | [TSKV](#tskv) | ✔ | ✔ | | [Pretty](#pretty) | ✗ | ✔ | | [PrettyCompact](#prettycompact) | ✗ | ✔ | @@ -128,9 +127,9 @@ world 数组用方括号包裹、逗号分隔的形式表示(例如`[11,22,33]`)。数组中的数字项按上述规则进行格式化。`日期`和`日期时间`类型用单引号包裹。字符串用单引号包裹,遵循上述转义规则。 -[NULL](https://clickhouse.tech/docs/zh/sql-reference/syntax/)将输出为`\N`。 +[NULL](https://clickhouse.com/docs/zh/sql-reference/syntax/)将输出为`\N`。 -[Nested](https://clickhouse.tech/docs/zh/sql-reference/data-types/nested-data-structures/nested/)结构的每个元素都表示为数组。 +[Nested](https://clickhouse.com/docs/zh/sql-reference/data-types/nested-data-structures/nested/)结构的每个元素都表示为数组。 示例: @@ -465,7 +464,7 @@ ClickHouse支持[NULL](../sql-reference/syntax.md), 在JSON输出中显示为`nu - [JSONEachRow](#jsoneachrow)格式 - [output_format_json_array_of_rows](../operations/settings/settings.md#output-format-json-array-of-rows)设置 -## JSONString {#jsonstring} +## JSONStrings {#jsonstrings} 与JSON的不同之处在于数据字段以字符串输出,而不是以类型化JSON值输出。 @@ -543,7 +542,7 @@ SELECT * FROM json_as_string; ``` ## JSONCompact {#jsoncompact} -## JSONCompactString {#jsoncompactstring} +## JSONCompactStrings {#jsoncompactstrings} 与JSON格式不同的是它以数组的方式输出结果,而不是以结构体。 @@ -582,7 +581,7 @@ SELECT * FROM json_as_string; ``` ```json -// JSONCompactString +// JSONCompactStrings { "meta": [ @@ -614,9 +613,9 @@ SELECT * FROM json_as_string; ``` ## JSONEachRow {#jsoneachrow} -## JSONStringEachRow {#jsonstringeachrow} +## JSONStringsEachRow {#jsonstringseachrow} ## JSONCompactEachRow {#jsoncompacteachrow} -## JSONCompactStringEachRow {#jsoncompactstringeachrow} +## JSONCompactStringsEachRow {#jsoncompactstringseachrow} 使用这些格式时,ClickHouse会将行输出为用换行符分隔的JSON值,这些输出数据作为一个整体时,由于没有分隔符(,)因而不是有效的JSON文档。 @@ -629,9 +628,9 @@ SELECT * FROM json_as_string; 在插入数据时,应该为每一行提供一个单独的JSON值。 ## JSONEachRowWithProgress {#jsoneachrowwithprogress} -## JSONStringEachRowWithProgress {#jsonstringeachrowwithprogress} +## JSONStringsEachRowWithProgress {#jsonstringseachrowwithprogress} -与`JSONEachRow`/`JSONStringEachRow`不同的是,ClickHouse还将生成作为JSON值的进度信息。 +与`JSONEachRow`/`JSONStringsEachRow`不同的是,ClickHouse还将生成作为JSON值的进度信息。 ```json {"row":{"'hello'":"hello","multiply(42, number)":"0","range(5)":[0,1,2,3,4]}} @@ -641,9 +640,9 @@ SELECT * FROM json_as_string; ``` ## JSONCompactEachRowWithNamesAndTypes {#jsoncompacteachrowwithnamesandtypes} -## JSONCompactStringEachRowWithNamesAndTypes {#jsoncompactstringeachrowwithnamesandtypes} +## JSONCompactStringsEachRowWithNamesAndTypes {#jsoncompactstringseachrowwithnamesandtypes} -与`JSONCompactEachRow`/`JSONCompactStringEachRow`不同的是,列名和类型被写入前两行。 +与`JSONCompactEachRow`/`JSONCompactStringsEachRow`不同的是,列名和类型被写入前两行。 ```json ["'hello'", "multiply(42, number)", "range(5)"] @@ -932,7 +931,7 @@ FixedString 被简单地表示为字节序列。 这是 `INSERT INTO t VALUES ...` 中可以使用的格式,但您也可以将其用于查询结果。 -另见:[input_format_values_interpret_expressions](https://clickhouse.tech/docs/en/operations/settings/settings/#settings-input_format_values_interpret_expressions)和[input_format_values_deduce_templates_of_expressions](https://clickhouse.tech/docs/en/operations/settings/settings/#settings-input_format_values_deduce_templates_of_expressions)。 +另见:[input_format_values_interpret_expressions](https://clickhouse.com/docs/en/operations/settings/settings/#settings-input_format_values_interpret_expressions)和[input_format_values_deduce_templates_of_expressions](https://clickhouse.com/docs/en/operations/settings/settings/#settings-input_format_values_deduce_templates_of_expressions)。 ## Vertical {#vertical} @@ -951,31 +950,6 @@ SELECT * FROM t_null FORMAT Vertical 该格式仅适用于输出查询结果,但不适用于解析输入(将数据插入到表中)。 -## VerticalRaw {#verticalraw} - -和 `Vertical` 格式不同点在于,行是不会被转义的。 -这种格式仅仅适用于输出,但不适用于解析输入(将数据插入到表中)。 - -示例: - - :) SHOW CREATE TABLE geonames FORMAT VerticalRaw; - Row 1: - ────── - statement: CREATE TABLE default.geonames ( geonameid UInt32, date Date DEFAULT CAST('2017-12-08' AS Date)) ENGINE = MergeTree(date, geonameid, 8192) - - :) SELECT 'string with \'quotes\' and \t with some special \n characters' AS test FORMAT VerticalRaw; - Row 1: - ────── - test: string with 'quotes' and with some special - characters - -和 Vertical 格式相比: - - :) SELECT 'string with \'quotes\' and \t with some special \n characters' AS test FORMAT Vertical; - Row 1: - ────── - test: string with \'quotes\' and \t with some special \n characters - ## XML {#xml} 该格式仅适用于输出查询结果,但不适用于解析输入,示例: @@ -1351,7 +1325,7 @@ $ clickhouse-client --query="SELECT * FROM {some_table} FORMAT ORC" > {filename. 要与Hadoop交换数据,您可以使用 [HDFS表引擎](../engines/table-engines/integrations/hdfs.md). ## LineAsString {#lineasstring} -这种格式下,每行输入数据都会当做一个字符串。这种格式仅适用于仅有一列[String](https://clickhouse.tech/docs/en/sql-reference/data-types/string/)类型的列的表。其余列必须设置为[DEFAULT](https://clickhouse.tech/docs/en/sql-reference/statements/create/table/#default)、[MATERIALIZED](https://clickhouse.tech/docs/en/sql-reference/statements/create/table/#materialized)或者被忽略。 +这种格式下,每行输入数据都会当做一个字符串。这种格式仅适用于仅有一列[String](https://clickhouse.com/docs/en/sql-reference/data-types/string/)类型的列的表。其余列必须设置为[DEFAULT](https://clickhouse.com/docs/en/sql-reference/statements/create/table/#default)、[MATERIALIZED](https://clickhouse.com/docs/en/sql-reference/statements/create/table/#materialized)或者被忽略。 ### 示例: 查询如下: @@ -1370,14 +1344,14 @@ SELECT * FROM line_as_string; ## Regexp {#regexp} 每一列输入数据根据正则表达式解析。使用`Regexp`格式时,可以使用如下设置: -- `format_regexp`,[String](https://clickhouse.tech/docs/en/sql-reference/data-types/string/)类型。包含[re2](https://github.com/google/re2/wiki/Syntax)格式的正则表达式。 -- `format_regexp_escaping_rule`,[String](https://clickhouse.tech/docs/en/sql-reference/data-types/string/)类型。支持如下转义规则: - - CSV(规则相同于[CSV](https://clickhouse.tech/docs/zh/interfaces/formats/#csv)) - - JSON(相同于[JSONEachRow](https://clickhouse.tech/docs/zh/interfaces/formats/#jsoneachrow)) - - Escaped(相同于[TSV](https://clickhouse.tech/docs/zh/interfaces/formats/#tabseparated)) - - Quoted(相同于[Values](https://clickhouse.tech/docs/zh/interfaces/formats/#data-format-values)) +- `format_regexp`,[String](https://clickhouse.com/docs/en/sql-reference/data-types/string/)类型。包含[re2](https://github.com/google/re2/wiki/Syntax)格式的正则表达式。 +- `format_regexp_escaping_rule`,[String](https://clickhouse.com/docs/en/sql-reference/data-types/string/)类型。支持如下转义规则: + - CSV(规则相同于[CSV](https://clickhouse.com/docs/zh/interfaces/formats/#csv)) + - JSON(相同于[JSONEachRow](https://clickhouse.com/docs/zh/interfaces/formats/#jsoneachrow)) + - Escaped(相同于[TSV](https://clickhouse.com/docs/zh/interfaces/formats/#tabseparated)) + - Quoted(相同于[Values](https://clickhouse.com/docs/zh/interfaces/formats/#data-format-values)) - Raw(将整个子匹配项进行提取,不转义) -- `format_regexp_skip_unmatched`,[UInt8](https://clickhouse.tech/docs/zh/sql-reference/data-types/int-uint/)类型。当`format_regexp`表达式没有匹配到结果时是否抛出异常。可为0或1。 +- `format_regexp_skip_unmatched`,[UInt8](https://clickhouse.com/docs/zh/sql-reference/data-types/int-uint/)类型。当`format_regexp`表达式没有匹配到结果时是否抛出异常。可为0或1。 ### 用法 {#usage-1} `format_regexp`设置会应用于每一行输入数据。正则表达式的子匹配项数必须等于输入数据期望得到的列数。 @@ -1417,7 +1391,7 @@ SELECT * FROM imp_regex_table; ## RawBLOB {#rawblob} 这种格式下,所有输入数据视为一个值。该格式仅适用于仅有一String类型的列的表。输出时,使用二进制格式输出。当输出结果不唯一时,输出是有歧义的,并且不能通过该输出还原原数据。 -下面是`RawBLOB`与[TabSeparatedRaw](https://clickhouse.tech/docs/zh/interfaces/formats/#tabseparatedraw)的对比: +下面是`RawBLOB`与[TabSeparatedRaw](https://clickhouse.com/docs/zh/interfaces/formats/#tabseparatedraw)的对比: `RawBloB`: @@ -1431,7 +1405,7 @@ SELECT * FROM imp_regex_table; - 每行的值通过制表符分隔。 - 每行最后的值得后面有换行符。 -下面是`RawBLOB`与[RowBinary](https://clickhouse.tech/docs/zh/interfaces/formats/#rowbinary)的对比: +下面是`RawBLOB`与[RowBinary](https://clickhouse.com/docs/zh/interfaces/formats/#rowbinary)的对比: `RawBloB`: @@ -1462,8 +1436,8 @@ f9725a22f9191e064120d718e26862a9 - 格式架构为架构文件名和此文件中消息类型的组合,用冒号分隔,例如 `schemafile.proto:MessageType`. 如果文件具有格式的标准扩展名(例如, `Protobuf`格式的架构文件标准扩展名为`.proto`),它可以被省略,在这种情况下,格式模式如下所示 `schemafile:MessageType`. -如果您通过[Client](../interfaces/cli.md) 在 [交互模式](https://clickhouse.tech/docs/zh/interfaces/cli/#cli_usage)下输入或输出数据,格式架构中指定的文件名可以使用绝对路径或客户端当前目录的相对路径。 -如果在[批处理模式](https://clickhouse.tech/docs/zh/interfaces/cli/#cli_usage)下使用客户端,则由于安全原因,架构的路径必须使用相对路径。 +如果您通过[Client](../interfaces/cli.md) 在 [交互模式](https://clickhouse.com/docs/zh/interfaces/cli/#cli_usage)下输入或输出数据,格式架构中指定的文件名可以使用绝对路径或客户端当前目录的相对路径。 +如果在[批处理模式](https://clickhouse.com/docs/zh/interfaces/cli/#cli_usage)下使用客户端,则由于安全原因,架构的路径必须使用相对路径。 如果您通过 HTTP接口](../interfaces/http.md)输入或输出数据,格式架构中指定的文件名应该位于服务器设置的[format_schema_path](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-format_schema_path)指定的目录中。 @@ -1479,4 +1453,4 @@ f9725a22f9191e064120d718e26862a9 - -[来源文章](https://clickhouse.tech/docs/zh/interfaces/formats/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/formats/) diff --git a/docs/zh/interfaces/http.md b/docs/zh/interfaces/http.md index 8ab54293b32..cdce4f2f2e7 100644 --- a/docs/zh/interfaces/http.md +++ b/docs/zh/interfaces/http.md @@ -624,4 +624,4 @@ $ curl -vv -H 'XXX:xxx' 'http://localhost:8123/get_relative_path_static_handler' * Connection #0 to host localhost left intact ``` -[来源文章](https://clickhouse.tech/docs/zh/interfaces/http_interface/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/http_interface/) diff --git a/docs/zh/interfaces/index.md b/docs/zh/interfaces/index.md index 4bc14539896..aa884064abd 100644 --- a/docs/zh/interfaces/index.md +++ b/docs/zh/interfaces/index.md @@ -24,4 +24,4 @@ ClickHouse提供了两个网络接口(两个都可以选择包装在TLS中以增 - [第三方集成库](../interfaces/third-party/integrations.md) - [可视化UI](../interfaces/third-party/gui.md) -[来源文章](https://clickhouse.tech/docs/en/interfaces/) +[来源文章](https://clickhouse.com/docs/en/interfaces/) diff --git a/docs/zh/interfaces/jdbc.md b/docs/zh/interfaces/jdbc.md index 87d006fe932..ed2fad24714 100644 --- a/docs/zh/interfaces/jdbc.md +++ b/docs/zh/interfaces/jdbc.md @@ -10,4 +10,4 @@ toc_title: JDBC驱动 - [ClickHouse-Native-JDBC](https://github.com/housepower/ClickHouse-Native-JDBC) - [clickhouse4j](https://github.com/blynkkk/clickhouse4j) -[来源文章](https://clickhouse.tech/docs/zh/interfaces/jdbc/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/jdbc/) diff --git a/docs/zh/interfaces/mysql.md b/docs/zh/interfaces/mysql.md index fa9fc0053a6..c8f24b40f81 100644 --- a/docs/zh/interfaces/mysql.md +++ b/docs/zh/interfaces/mysql.md @@ -44,4 +44,4 @@ mysql> - 某些数据类型以字符串形式发送 -[原始文章](https://clickhouse.tech/docs/en/interfaces/mysql/) +[原始文章](https://clickhouse.com/docs/en/interfaces/mysql/) diff --git a/docs/zh/interfaces/odbc.md b/docs/zh/interfaces/odbc.md index d0e38f96609..89ba1e30c6a 100644 --- a/docs/zh/interfaces/odbc.md +++ b/docs/zh/interfaces/odbc.md @@ -7,4 +7,4 @@ toc_title: ODBC驱动 - [官方驱动](https://github.com/ClickHouse/clickhouse-odbc)。 -[来源文章](https://clickhouse.tech/docs/zh/interfaces/odbc/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/odbc/) diff --git a/docs/zh/interfaces/tcp.md b/docs/zh/interfaces/tcp.md index 571fd22b758..b43af0e533e 100644 --- a/docs/zh/interfaces/tcp.md +++ b/docs/zh/interfaces/tcp.md @@ -7,4 +7,4 @@ toc_title: 原生接口(TCP) 原生接口协议用于[命令行客户端](cli.md),用于分布式查询处理期间的服务器间通信,以及其他C++ 程序。不幸的是,原生ClickHouse协议还没有正式的规范,但它可以从ClickHouse源代码[从这里开始](https://github.com/ClickHouse/ClickHouse/tree/master/src/Client)或通过拦截和分析TCP流量进行逆向工程。 -[原文](https://clickhouse.tech/docs/en/interfaces/tcp/) +[原文](https://clickhouse.com/docs/en/interfaces/tcp/) diff --git a/docs/zh/interfaces/third-party/client-libraries.md b/docs/zh/interfaces/third-party/client-libraries.md index e2412f2b8de..3136b928e7b 100644 --- a/docs/zh/interfaces/third-party/client-libraries.md +++ b/docs/zh/interfaces/third-party/client-libraries.md @@ -64,4 +64,4 @@ Yandex**没有**维护下面列出的库,也没有做过任何广泛的测试 - Haskell - [hdbc-clickhouse](https://github.com/zaneli/hdbc-clickhouse) -[来源文章](https://clickhouse.tech/docs/en/interfaces/third-party/client_libraries/) +[来源文章](https://clickhouse.com/docs/en/interfaces/third-party/client_libraries/) diff --git a/docs/zh/interfaces/third-party/gui.md b/docs/zh/interfaces/third-party/gui.md index 46baf55d564..8afd5832e3b 100644 --- a/docs/zh/interfaces/third-party/gui.md +++ b/docs/zh/interfaces/third-party/gui.md @@ -72,6 +72,22 @@ ClickHouse Web 界面 [Tabix](https://github.com/tabixio/tabix). [clickhouse-flamegraph](https://github.com/Slach/clickhouse-flamegraph) 是一个可视化的专业工具`system.trace_log`如[flamegraph](http://www.brendangregg.com/flamegraphs.html). +### DBM {#dbm} + +[DBM](https://dbm.incubator.edurt.io/) DBM是一款ClickHouse可视化管理工具! + +特征: + +- 支持查询历史(分页、全部清除等) +- 支持选中的sql子句查询(多窗口等) +- 支持终止查询 +- 支持表管理 +- 支持数据库管理 +- 支持自定义查询 +- 支持多数据源管理(连接测试、监控) +- 支持监控(处理进程、连接、查询) +- 支持迁移数据 + ## 商业 {#shang-ye} ### Holistics {#holistics-software} @@ -99,4 +115,4 @@ ClickHouse Web 界面 [Tabix](https://github.com/tabixio/tabix). - 重构。 - 搜索和导航。 -[来源文章](https://clickhouse.tech/docs/zh/interfaces/third-party/gui/) +[来源文章](https://clickhouse.com/docs/zh/interfaces/third-party/gui/) diff --git a/docs/zh/interfaces/third-party/integrations.md b/docs/zh/interfaces/third-party/integrations.md index 20dcf47cabd..075e1ca0870 100644 --- a/docs/zh/interfaces/third-party/integrations.md +++ b/docs/zh/interfaces/third-party/integrations.md @@ -42,7 +42,7 @@ Yandex**没有**维护下面列出的库,也没有做过任何广泛的测试 - [mfedotov/clickhouse](https://forge.puppet.com/mfedotov/clickhouse) - Monitoring - [Graphite](https://graphiteapp.org) - - [graphouse](https://github.com/yandex/graphouse) + - [graphouse](https://github.com/ClickHouse/graphouse) - [carbon-clickhouse](https://github.com/lomik/carbon-clickhouse) - [graphite-clickhouse](https://github.com/lomik/graphite-clickhouse) - [graphite-ch-optimizer](https://github.com/innogames/graphite-ch-optimizer) - optimizes staled partitions in [\*GraphiteMergeTree](../../engines/table-engines/mergetree-family/graphitemergetree.md#graphitemergetree) if rules from [rollup configuration](../../engines/table-engines/mergetree-family/graphitemergetree.md#rollup-configuration) could be applied @@ -105,4 +105,4 @@ Yandex**没有**维护下面列出的库,也没有做过任何广泛的测试 - [GraphQL](https://github.com/graphql) - [activecube-graphql](https://github.com/bitquery/activecube-graphql) -[源文章](https://clickhouse.tech/docs/en/interfaces/third-party/integrations/) +[源文章](https://clickhouse.com/docs/en/interfaces/third-party/integrations/) diff --git a/docs/zh/interfaces/third-party/proxy.md b/docs/zh/interfaces/third-party/proxy.md index a2050863f30..034657a70d2 100644 --- a/docs/zh/interfaces/third-party/proxy.md +++ b/docs/zh/interfaces/third-party/proxy.md @@ -41,4 +41,4 @@ toc_title: 第三方代理 使用go语言实现。 -[Original article](https://clickhouse.tech/docs/en/interfaces/third-party/proxy/) +[Original article](https://clickhouse.com/docs/en/interfaces/third-party/proxy/) diff --git a/docs/zh/introduction/adopters.md b/docs/zh/introduction/adopters.md index 6b9ac7c2ceb..e67e4bfca6e 100644 --- a/docs/zh/introduction/adopters.md +++ b/docs/zh/introduction/adopters.md @@ -11,11 +11,11 @@ toc_title: "ClickHouse用户" | 公司简介 | 行业 | 用例 | 群集大小 | (Un)压缩数据大小\* | 参考资料 | |-----------------------------------------------------------------|------------------|----------------|---------------------------------------------------|----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [2gis](https://2gis.ru) | 地图 | 监测 | — | — | [俄文,2019年7月](https://youtu.be/58sPkXfq6nw) | -| [Aloha 浏览器](https://alohabrowser.com/) | 移动应用程序 | 浏览器后端 | — | — | [俄文幻灯片,2019年5月](https://github.com/yandex/clickhouse-presentations/blob/master/meetup22/aloha.pdf) | +| [Aloha 浏览器](https://alohabrowser.com/) | 移动应用程序 | 浏览器后端 | — | — | [俄文幻灯片,2019年5月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/aloha.pdf) | | [阿玛迪斯](https://amadeus.com/) | 旅行 | 分析 | — | — | [新闻稿,四月2018](https://www.altinity.com/blog/2018/4/5/amadeus-technologies-launches-investment-and-insights-tool-based-on-machine-learning-and-strategy-algorithms) | | [Appsflyer](https://www.appsflyer.com) | 移动分析 | 主要产品 | — | — | [俄文,2019年7月](https://www.youtube.com/watch?v=M3wbRlcpBbY) | | [ArenaData](https://arenadata.tech/) | 数据平台 | 主要产品 | — | — | [俄文幻灯片,十二月2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup38/indexes.pdf) | -| [Badoo](https://badoo.com) | 约会 | 时间序列 | — | — | [俄文幻灯片,十二月2019](https://presentations.clickhouse.tech/meetup38/forecast.pdf) | +| [Badoo](https://badoo.com) | 约会 | 时间序列 | — | — | [俄文幻灯片,十二月2019](https://presentations.clickhouse.com/meetup38/forecast.pdf) | | [Benocs](https://www.benocs.com/) | 网络遥测和分析 | 主要产品 | — | — | [英文幻灯片,2017年10月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup9/lpm.pdf) | | [彭博社](https://www.bloomberg.com/) | 金融、媒体 | 监测 | 102个服务器 | — | [幻灯片,2018年5月](https://www.slideshare.net/Altinity/http-analytics-for-6m-requests-per-second-using-clickhouse-by-alexander-bocharov) | | [Bloxy](https://bloxy.info) | 区块链 | 分析 | — | — | [俄文幻灯片,八月2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/4_bloxy.pptx) | @@ -35,7 +35,7 @@ toc_title: "ClickHouse用户" | [Exness](https://www.exness.com) | 交易 | 指标,日志记录 | — | — | [俄语交谈,2019年5月](https://youtu.be/_rpU-TvSfZ8?t=3215) | | [精灵](https://geniee.co.jp) | 广告网络 | 主要产品 | — | — | [日文博客,2017年7月](https://tech.geniee.co.jp/entry/2017/07/20/160100) | | [虎牙](https://www.huya.com/) | 视频流 | 分析 | — | — | [中文幻灯片,2018年10月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/7.%20ClickHouse万亿数据分析实践%20李本旺(sundy-li)%20虎牙.pdf) | -| [Idealista](https://www.idealista.com) | 房地产 | 分析 | — | — | [英文博客文章,四月2019](https://clickhouse.tech/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | +| [Idealista](https://www.idealista.com) | 房地产 | 分析 | — | — | [英文博客文章,四月2019](https://clickhouse.com/blog/en/clickhouse-meetup-in-madrid-on-april-2-2019) | | [Infovista](https://www.infovista.com/) | 网络 | 分析 | — | — | [英文幻灯片,十月2019](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup30/infovista.pdf) | | [InnoGames](https://www.innogames.com) | 游戏 | 指标,日志记录 | — | — | [俄文幻灯片,2019年9月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/graphite_and_clickHouse.pdf) | | [Integros](https://integros.com) | 视频服务平台 | 分析 | — | — | [俄文幻灯片,2019年5月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | @@ -65,15 +65,15 @@ toc_title: "ClickHouse用户" | [Spotify](https://www.spotify.com) | 音乐 | 实验 | — | — | [幻灯片,七月2018](https://www.slideshare.net/glebus/using-clickhouse-for-experimentation-104247173) | | [腾讯](https://www.tencent.com) | 大数据 | 数据处理 | — | — | [中文幻灯片,2018年10月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup19/5.%20ClickHouse大数据集群应用_李俊飞腾讯网媒事业部.pdf) | | 腾讯QQ音乐(TME) | 大数据 | 数据处理 | — | — | [博客文章,2020年6月](https://cloud.tencent.com/developer/article/1637840) -| [优步](https://www.uber.com) | 出租车 | 日志记录 | — | — | [幻灯片,二月2020](https://presentations.clickhouse.tech/meetup40/uber.pdf) | +| [优步](https://www.uber.com) | 出租车 | 日志记录 | — | — | [幻灯片,二月2020](https://presentations.clickhouse.com/meetup40/uber.pdf) | | [VKontakte](https://vk.com) | 社交网络 | 统计,日志记录 | — | — | [俄文幻灯片,八月2018](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup17/3_vk.pdf) | | [Wisebits](https://wisebits.com/) | IT解决方案 | 分析 | — | — | [俄文幻灯片,2019年5月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup22/strategies.pdf) | | [晓信科技](https://www.xiaoheiban.cn/) | 教育 | 共同目的 | — | — | [英文幻灯片,2019年11月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/sync-clickhouse-with-mysql-mongodb.pptx) | | [喜马拉雅](https://www.ximalaya.com/) | 音频共享 | OLAP | — | — | [英文幻灯片,2019年11月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup33/ximalaya.pdf) | | [Yandex云](https://cloud.yandex.ru/services/managed-clickhouse) | 公有云 | 主要产品 | — | — | [俄文,2019年12月](https://www.youtube.com/watch?v=pgnak9e_E0o) | -| [Yandex DataLens](https://cloud.yandex.ru/services/datalens) | 商业智能 | 主要产品 | — | — | [俄文幻灯片,十二月2019](https://presentations.clickhouse.tech/meetup38/datalens.pdf) | +| [Yandex DataLens](https://cloud.yandex.ru/services/datalens) | 商业智能 | 主要产品 | — | — | [俄文幻灯片,十二月2019](https://presentations.clickhouse.com/meetup38/datalens.pdf) | | [Yandex市场](https://market.yandex.ru/) | 电子商务 | 指标,日志记录 | — | — | [俄文,2019年1月](https://youtu.be/_l1qP0DyBcA?t=478) | -| [Yandex Metrica](https://metrica.yandex.com) | 网站分析 | 主要产品 | 一个集群中的360台服务器,一个部门中的1862台服务器 | 66.41PiB/5.68PiB | [幻灯片,二月2020](https://presentations.clickhouse.tech/meetup40/introduction/#13) | +| [Yandex Metrica](https://metrica.yandex.com) | 网站分析 | 主要产品 | 一个集群中的360台服务器,一个部门中的1862台服务器 | 66.41PiB/5.68PiB | [幻灯片,二月2020](https://presentations.clickhouse.com/meetup40/introduction/#13) | | [ЦВТ](https://htc-cs.ru/) | 软件开发 | 指标,日志记录 | — | — | [博客文章,三月2019,俄文](https://vc.ru/dev/62715-kak-my-stroili-monitoring-na-prometheus-clickhouse-i-elk) | | [МКБ](https://mkb.ru/) | 银行 | 网络系统监控 | — | — | [俄文幻灯片,2019年9月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup28/mkb.pdf) | | [金数据](https://jinshuju.net) | 商业智能分析 | 主要产品 | — | — | [中文幻灯片,2019年10月](https://github.com/ClickHouse/clickhouse-presentations/blob/master/meetup24/3.%20金数据数据架构调整方案Public.pdf) | @@ -82,4 +82,4 @@ toc_title: "ClickHouse用户" | [Crazypanda](https://crazypanda.ru/en/) | 游戏 | | — | — | ClickHouse 社区会议 | | [FunCorp](https://fun.co/rp) | 游戏 | | — | — | [文章](https://www.altinity.com/blog/migrating-from-redshift-to-clickhouse) | -[原始文章](https://clickhouse.tech/docs/en/introduction/adopters/) +[原始文章](https://clickhouse.com/docs/en/introduction/adopters/) diff --git a/docs/zh/introduction/distinctive-features.md b/docs/zh/introduction/distinctive-features.md index f74c98a0c1d..35d46163860 100644 --- a/docs/zh/introduction/distinctive-features.md +++ b/docs/zh/introduction/distinctive-features.md @@ -86,4 +86,4 @@ ClickHouse使用SQL查询实现用户帐户管理,并允许[角色的访问控 2. 缺少高频率,低延迟的修改或删除已存在数据的能力。仅能用于批量删除或修改数据,但这符合 [GDPR](https://gdpr-info.eu)。 3. 稀疏索引使得ClickHouse不适合通过其键检索单行的点查询。 -[来源文章](https://clickhouse.tech/docs/en/introduction/distinctive_features/) +[来源文章](https://clickhouse.com/docs/en/introduction/distinctive_features/) diff --git a/docs/zh/introduction/history.md b/docs/zh/introduction/history.md index 265ade8785b..95d7b1ddc96 100644 --- a/docs/zh/introduction/history.md +++ b/docs/zh/introduction/history.md @@ -51,4 +51,4 @@ OLAPServer可以很好的工作在非聚合数据上,但是它有诸多限制 为了消除OLAPServer的这些局限性,解决所有报表使用非聚合数据的问题,我们开发了ClickHouse数据库管理系统。 -[来源文章](https://clickhouse.tech/docs/en/introduction/ya_metrika_task/) +[来源文章](https://clickhouse.com/docs/en/introduction/ya_metrika_task/) diff --git a/docs/zh/introduction/performance.md b/docs/zh/introduction/performance.md index 0ae4b9b1e1e..67ad8768205 100644 --- a/docs/zh/introduction/performance.md +++ b/docs/zh/introduction/performance.md @@ -5,9 +5,9 @@ toc_title: ClickHouse性能 # 性能 {#performance} -根据Yandex的内部测试结果,ClickHouse表现出了比同类可比较产品更优的性能。你可以在 [这里](https://clickhouse.tech/benchmark/dbms/) 查看具体的测试结果。 +根据Yandex的内部测试结果,ClickHouse表现出了比同类可比较产品更优的性能。你可以在 [这里](https://clickhouse.com/benchmark/dbms/) 查看具体的测试结果。 -许多其他的测试也证实这一点。你可以使用互联网搜索到它们,或者你也可以从 [我们收集的部分相关连接](https://clickhouse.tech/#independent-benchmarks) 中查看。 +许多其他的测试也证实这一点。你可以使用互联网搜索到它们,或者你也可以从 [我们收集的部分相关连接](https://clickhouse.com/#independent-benchmarks) 中查看。 ## 单个大查询的吞吐量 {#dan-ge-da-cha-xun-de-tun-tu-liang} @@ -27,4 +27,4 @@ toc_title: ClickHouse性能 我们建议每次写入不少于1000行的批量写入,或每秒不超过一个写入请求。当使用tab-separated格式将一份数据写入到MergeTree表中时,写入速度大约为50到200MB/s。如果您写入的数据每行为1Kb,那么写入的速度为50,000到200,000行每秒。如果您的行更小,那么写入速度将更高。为了提高写入性能,您可以使用多个INSERT进行并行写入,这将带来线性的性能提升。 -[来源文章](https://clickhouse.tech/docs/en/introduction/performance/) +[来源文章](https://clickhouse.com/docs/en/introduction/performance/) diff --git a/docs/zh/operations/access-rights.md b/docs/zh/operations/access-rights.md index 97841699d09..ab8b3886a9a 100644 --- a/docs/zh/operations/access-rights.md +++ b/docs/zh/operations/access-rights.md @@ -143,4 +143,4 @@ Management queries: 默认情况,SQL驱动方式的访问权限和账户管理对所有用户都是关闭的。你需要在 `users.xml` 中配置至少一个用户,并且把[权限管理](settings/settings-users.md#access_management-user-setting)的值设置为1。 -[Original article](https://clickhouse.tech/docs/en/operations/access_rights/) +[Original article](https://clickhouse.com/docs/en/operations/access_rights/) diff --git a/docs/zh/operations/backup.md b/docs/zh/operations/backup.md index dbaafc8b8a7..165ecdf2a9b 100644 --- a/docs/zh/operations/backup.md +++ b/docs/zh/operations/backup.md @@ -38,4 +38,4 @@ ClickHouse允许使用 `ALTER TABLE ... FREEZE PARTITION ...` 查询以创建表 第三方工具可用于自动化此方法: [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup). -[原始文章](https://clickhouse.tech/docs/en/operations/backup/) +[原始文章](https://clickhouse.com/docs/en/operations/backup/) diff --git a/docs/zh/operations/caches.md b/docs/zh/operations/caches.md new file mode 120000 index 00000000000..ab229298e5f --- /dev/null +++ b/docs/zh/operations/caches.md @@ -0,0 +1 @@ +../../en/operations/caches.md \ No newline at end of file diff --git a/docs/zh/operations/clickhouse-keeper.md b/docs/zh/operations/clickhouse-keeper.md new file mode 120000 index 00000000000..528ba82fea4 --- /dev/null +++ b/docs/zh/operations/clickhouse-keeper.md @@ -0,0 +1 @@ +../../en/operations/clickhouse-keeper.md \ No newline at end of file diff --git a/docs/zh/operations/configuration-files.md b/docs/zh/operations/configuration-files.md index ae760ee2d5d..da76a3588e3 100644 --- a/docs/zh/operations/configuration-files.md +++ b/docs/zh/operations/configuration-files.md @@ -13,7 +13,7 @@ ClickHouse支持多配置文件管理。主配置文件是`/etc/clickhouse-serve 如果指定`remove`属性,则删除该元素。 -此外,配置文件还可指定"substitutions"。如果一个元素有`incl`属性,则文件中的相应替换值将被使用。默认情况下,具有替换的文件的路径为`/etc/metrika.xml`。这可以在服务配置中的[include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from)元素中被修改。替换值在这个文件的`/yandex/substitution_name`元素中被指定。如果`incl`中指定的替换值不存在,则将其记录在日志中。为防止ClickHouse记录丢失的替换,请指定`optional="true"`属性(例如,[宏](server-configuration-parameters/settings.md)设置)。 +此外,配置文件还可指定"substitutions"。如果一个元素有`incl`属性,则文件中的相应替换值将被使用。默认情况下,具有替换的文件的路径为`/etc/metrika.xml`。这可以在服务配置中的[include_from](server-configuration-parameters/settings.md#server_configuration_parameters-include_from)元素中被修改。替换值在这个文件的`/clickhouse/substitution_name`元素中被指定。如果`incl`中指定的替换值不存在,则将其记录在日志中。为防止ClickHouse记录丢失的替换,请指定`optional="true"`属性(例如,[宏](server-configuration-parameters/settings.md)设置)。 替换也可以从ZooKeeper执行。为此,请指定属性`from_zk = "/path/to/node"`。元素值被替换为ZooKeeper节点`/path/to/node`的内容。您还可以将整个XML子树放在ZooKeeper节点上,并将其完全插入到源元素中。 @@ -44,4 +44,4 @@ $ cat /etc/clickhouse-server/users.d/alice.xml 服务器跟踪配置文件中的更改,以及执行替换和复盖时使用的文件和ZooKeeper节点,并动态重新加载用户和集群的设置。 这意味着您可以在不重新启动服务器的情况下修改群集、用户及其设置。 -[原始文章](https://clickhouse.tech/docs/en/operations/configuration_files/) +[原始文章](https://clickhouse.com/docs/en/operations/configuration_files/) diff --git a/docs/zh/operations/external-authenticators/index.md b/docs/zh/operations/external-authenticators/index.md new file mode 120000 index 00000000000..5f656246c9d --- /dev/null +++ b/docs/zh/operations/external-authenticators/index.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/index.md \ No newline at end of file diff --git a/docs/zh/operations/external-authenticators/kerberos.md b/docs/zh/operations/external-authenticators/kerberos.md new file mode 120000 index 00000000000..b5a4d557de4 --- /dev/null +++ b/docs/zh/operations/external-authenticators/kerberos.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/kerberos.md \ No newline at end of file diff --git a/docs/zh/operations/external-authenticators/ldap.md b/docs/zh/operations/external-authenticators/ldap.md new file mode 120000 index 00000000000..a171d0ac05a --- /dev/null +++ b/docs/zh/operations/external-authenticators/ldap.md @@ -0,0 +1 @@ +../../../en/operations/external-authenticators/ldap.md \ No newline at end of file diff --git a/docs/zh/operations/index.md b/docs/zh/operations/index.md index 5139f083ceb..c3f55ac2a11 100644 --- a/docs/zh/operations/index.md +++ b/docs/zh/operations/index.md @@ -22,4 +22,4 @@ ClickHouse操作手册由以下主要部分组成: - [设置](../operations/settings/index.md) - [实用工具](../operations/utilities/index.md) -[原文](https://clickhouse.tech/docs/en/operations/) +[原文](https://clickhouse.com/docs/en/operations/) diff --git a/docs/zh/operations/opentelemetry.md b/docs/zh/operations/opentelemetry.md new file mode 120000 index 00000000000..a4d96e36a4e --- /dev/null +++ b/docs/zh/operations/opentelemetry.md @@ -0,0 +1 @@ +../../en/operations/opentelemetry.md \ No newline at end of file diff --git a/docs/zh/operations/performance-test.md b/docs/zh/operations/performance-test.md index 7728325bb9a..9f5f4fe61f1 100644 --- a/docs/zh/operations/performance-test.md +++ b/docs/zh/operations/performance-test.md @@ -48,7 +48,7 @@ toc_title: "\u6D4B\u8BD5\u786C\u4EF6" - wget https://datasets.clickhouse.tech/hits/partitions/hits_100m_obfuscated_v1.tar.xz + wget https://datasets.clickhouse.com/hits/partitions/hits_100m_obfuscated_v1.tar.xz tar xvf hits_100m_obfuscated_v1.tar.xz -C . mv hits_100m_obfuscated_v1/* . diff --git a/docs/zh/operations/quotas.md b/docs/zh/operations/quotas.md index 21405ae106f..6bbaf0cb6fd 100644 --- a/docs/zh/operations/quotas.md +++ b/docs/zh/operations/quotas.md @@ -102,4 +102,4 @@ For distributed query processing, the accumulated amounts are stored on the requ 服务器重新启动时,将重置配额。 -[原始文章](https://clickhouse.tech/docs/en/operations/quotas/) +[原始文章](https://clickhouse.com/docs/en/operations/quotas/) diff --git a/docs/zh/operations/server-configuration-parameters/index.md b/docs/zh/operations/server-configuration-parameters/index.md index 82e698055fa..38ee76ee05d 100644 --- a/docs/zh/operations/server-configuration-parameters/index.md +++ b/docs/zh/operations/server-configuration-parameters/index.md @@ -8,4 +8,4 @@ Other settings are described in the «[设置](../settings/index.md#settings)» 在研究设置之前,请阅读 [配置文件](../configuration-files.md#configuration_files) 部分和注意使用替换(的 `incl` 和 `optional` 属性)。 -[原始文章](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/) +[原始文章](https://clickhouse.com/docs/en/operations/server_configuration_parameters/) diff --git a/docs/zh/operations/server-configuration-parameters/settings.md b/docs/zh/operations/server-configuration-parameters/settings.md index 0c6a5046877..d31dd5da805 100644 --- a/docs/zh/operations/server-configuration-parameters/settings.md +++ b/docs/zh/operations/server-configuration-parameters/settings.md @@ -282,12 +282,12 @@ ClickHouse每x秒重新加载内置字典。 这使得编辑字典 “on the fly ## keep_alive_timeout {#keep-alive-timeout} -ClickHouse在关闭连接之前等待传入请求的秒数。 默认为3秒。 +ClickHouse在关闭连接之前等待传入请求的秒数。默认为10秒。 **示例** ``` xml -3 +10 ``` ## listen_host {#server_configuration_parameters-listen_host} @@ -867,4 +867,4 @@ ZooKeeper中数据部分头的存储方法。 **默认值**: 15. -[原始文章](https://clickhouse.tech/docs/en/operations/server_configuration_parameters/settings/) +[原始文章](https://clickhouse.com/docs/en/operations/server_configuration_parameters/settings/) diff --git a/docs/zh/operations/settings/constraints-on-settings.md b/docs/zh/operations/settings/constraints-on-settings.md index 3b499199fa5..8fb83505e1b 100644 --- a/docs/zh/operations/settings/constraints-on-settings.md +++ b/docs/zh/operations/settings/constraints-on-settings.md @@ -72,4 +72,4 @@ Code: 452, e.displayText() = DB::Exception: Setting force_index_by_date should n **注:** 该 `default` 配置文件具有特殊的处理:所有定义的约束 `default` 配置文件成为默认约束,因此它们限制所有用户,直到为这些用户显式复盖它们。 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/constraints_on_settings/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/constraints_on_settings/) diff --git a/docs/zh/operations/settings/index.md b/docs/zh/operations/settings/index.md index 3528be0c641..38ce4c345e5 100644 --- a/docs/zh/operations/settings/index.md +++ b/docs/zh/operations/settings/index.md @@ -26,4 +26,4 @@ toc_folder_title: "\u8BBE\u7F6E" 本节不介绍只能在服务器配置文件中进行的设置。 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/) diff --git a/docs/zh/operations/settings/merge-tree-settings.md b/docs/zh/operations/settings/merge-tree-settings.md new file mode 120000 index 00000000000..51825e80601 --- /dev/null +++ b/docs/zh/operations/settings/merge-tree-settings.md @@ -0,0 +1 @@ +../../../en/operations/settings/merge-tree-settings.md \ No newline at end of file diff --git a/docs/zh/operations/settings/permissions-for-queries.md b/docs/zh/operations/settings/permissions-for-queries.md index aa7bc8c7937..a72500b76d5 100644 --- a/docs/zh/operations/settings/permissions-for-queries.md +++ b/docs/zh/operations/settings/permissions-for-queries.md @@ -58,4 +58,4 @@ ClickHouse中的查询可以分为几种类型: 默认值:1 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/permissions_for_queries/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/permissions_for_queries/) diff --git a/docs/zh/operations/settings/query-complexity.md b/docs/zh/operations/settings/query-complexity.md index 680d5e001e0..77f4a3729e1 100644 --- a/docs/zh/operations/settings/query-complexity.md +++ b/docs/zh/operations/settings/query-complexity.md @@ -254,4 +254,4 @@ Possible values: Default value: 0. -[原始文章](https://clickhouse.tech/docs/en/operations/settings/query_complexity/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/query_complexity/) diff --git a/docs/zh/operations/settings/settings-profiles.md b/docs/zh/operations/settings/settings-profiles.md index 8eec30d9fc5..77dff88d50b 100644 --- a/docs/zh/operations/settings/settings-profiles.md +++ b/docs/zh/operations/settings/settings-profiles.md @@ -78,4 +78,4 @@ SET profile = 'web' 该 `web` 配置文件是一个常规的配置文件,可以使用设置 `SET` 查询或在HTTP查询中使用URL参数。 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/settings_profiles/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/settings_profiles/) diff --git a/docs/zh/operations/settings/settings-users.md b/docs/zh/operations/settings/settings-users.md index bb630a43e43..ae75dddab58 100644 --- a/docs/zh/operations/settings/settings-users.md +++ b/docs/zh/operations/settings/settings-users.md @@ -161,4 +161,4 @@ DNS请求的所有结果都将被缓存,直到服务器重新启动。 该 `filter` 可以是导致任何表达式 [UInt8](../../sql-reference/data-types/int-uint.md)-键入值。 它通常包含比较和逻辑运算符。 从行 `database_name.table1` 其中,不会为此用户返回为0的筛选结果。 过滤是不兼容的 `PREWHERE` 操作和禁用 `WHERE→PREWHERE` 优化。 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/settings_users/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/settings_users/) diff --git a/docs/zh/operations/settings/settings.md b/docs/zh/operations/settings/settings.md index ef4f4f86d01..f8b736ea7c2 100644 --- a/docs/zh/operations/settings/settings.md +++ b/docs/zh/operations/settings/settings.md @@ -1252,7 +1252,7 @@ ClickHouse生成异常 默认值:16。 -[原始文章](https://clickhouse.tech/docs/en/operations/settings/settings/) +[原始文章](https://clickhouse.com/docs/en/operations/settings/settings/) ## transform_null_in {#transform_null_in} diff --git a/docs/zh/operations/storing-data.md b/docs/zh/operations/storing-data.md new file mode 120000 index 00000000000..16722fb5a39 --- /dev/null +++ b/docs/zh/operations/storing-data.md @@ -0,0 +1 @@ +../../en/operations/storing-data.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/clusters.md b/docs/zh/operations/system-tables/clusters.md index 386bdfd539b..e41aa2dd8fc 100644 --- a/docs/zh/operations/system-tables/clusters.md +++ b/docs/zh/operations/system-tables/clusters.md @@ -24,4 +24,4 @@ - [distributed_replica_error_cap设置](../../operations/settings/settings.md#settings-distributed_replica_error_cap) - [distributed_replica_error_half_life设置](../../operations/settings/settings.md#settings-distributed_replica_error_half_life) -[原文](https://clickhouse.tech/docs/zh/operations/system-tables/clusters) +[原文](https://clickhouse.com/docs/zh/operations/system-tables/clusters) diff --git a/docs/zh/operations/system-tables/columns.md b/docs/zh/operations/system-tables/columns.md index b21be98c0dc..9a90561a07b 100644 --- a/docs/zh/operations/system-tables/columns.md +++ b/docs/zh/operations/system-tables/columns.md @@ -26,4 +26,4 @@ machine_translated_rev: 5decc73b5dc60054f19087d3690c4eb99446a6c3 - `is_in_primary_key` (UInt8) — Flag that indicates whether the column is in the primary key expression. - `is_in_sampling_key` (UInt8) — Flag that indicates whether the column is in the sampling key expression. -[原文](https://clickhouse.tech/docs/zh/operations/system-tables/columns) +[原文](https://clickhouse.com/docs/zh/operations/system-tables/columns) diff --git a/docs/zh/operations/system-tables/crash-log.md b/docs/zh/operations/system-tables/crash-log.md new file mode 120000 index 00000000000..d1aa67601bc --- /dev/null +++ b/docs/zh/operations/system-tables/crash-log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/crash-log.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/current-roles.md b/docs/zh/operations/system-tables/current-roles.md new file mode 120000 index 00000000000..b9f1f9d6e9d --- /dev/null +++ b/docs/zh/operations/system-tables/current-roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/current-roles.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/data_skipping_indices.md b/docs/zh/operations/system-tables/data_skipping_indices.md new file mode 120000 index 00000000000..2820987bf69 --- /dev/null +++ b/docs/zh/operations/system-tables/data_skipping_indices.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/data_skipping_indices.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/distributed_ddl_queue.md b/docs/zh/operations/system-tables/distributed_ddl_queue.md new file mode 120000 index 00000000000..a9cadc74af2 --- /dev/null +++ b/docs/zh/operations/system-tables/distributed_ddl_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/distributed_ddl_queue.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/distribution_queue.md b/docs/zh/operations/system-tables/distribution_queue.md new file mode 120000 index 00000000000..3831b85000c --- /dev/null +++ b/docs/zh/operations/system-tables/distribution_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/distribution_queue.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/enabled-roles.md b/docs/zh/operations/system-tables/enabled-roles.md new file mode 120000 index 00000000000..04ffee25343 --- /dev/null +++ b/docs/zh/operations/system-tables/enabled-roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/enabled-roles.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/errors.md b/docs/zh/operations/system-tables/errors.md new file mode 120000 index 00000000000..2bb8c1dff0d --- /dev/null +++ b/docs/zh/operations/system-tables/errors.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/errors.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/grants.md b/docs/zh/operations/system-tables/grants.md new file mode 120000 index 00000000000..ec7f50b118e --- /dev/null +++ b/docs/zh/operations/system-tables/grants.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/grants.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/index.md b/docs/zh/operations/system-tables/index.md index 0e5778e3051..21e0bccc693 100644 --- a/docs/zh/operations/system-tables/index.md +++ b/docs/zh/operations/system-tables/index.md @@ -73,4 +73,4 @@ toc_title: "\u7CFB\u7EDF\u8868" - `OSReadBytes` - `OSWriteBytes` -[原始文章](https://clickhouse.tech/docs/en/operations/system-tables/) +[原始文章](https://clickhouse.com/docs/en/operations/system-tables/) diff --git a/docs/zh/operations/system-tables/licenses.md b/docs/zh/operations/system-tables/licenses.md new file mode 120000 index 00000000000..a84b4bbf3e3 --- /dev/null +++ b/docs/zh/operations/system-tables/licenses.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/licenses.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/opentelemetry_span_log.md b/docs/zh/operations/system-tables/opentelemetry_span_log.md new file mode 120000 index 00000000000..59aab8cd11d --- /dev/null +++ b/docs/zh/operations/system-tables/opentelemetry_span_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/opentelemetry_span_log.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/parts_columns.md b/docs/zh/operations/system-tables/parts_columns.md new file mode 120000 index 00000000000..f2c7d4dde34 --- /dev/null +++ b/docs/zh/operations/system-tables/parts_columns.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/parts_columns.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/query_views_log.md b/docs/zh/operations/system-tables/query_views_log.md new file mode 120000 index 00000000000..f606e4108ca --- /dev/null +++ b/docs/zh/operations/system-tables/query_views_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/query_views_log.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/quota_limits.md b/docs/zh/operations/system-tables/quota_limits.md new file mode 120000 index 00000000000..3fecf881c92 --- /dev/null +++ b/docs/zh/operations/system-tables/quota_limits.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quota_limits.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/quota_usage.md b/docs/zh/operations/system-tables/quota_usage.md new file mode 120000 index 00000000000..c79f1a75033 --- /dev/null +++ b/docs/zh/operations/system-tables/quota_usage.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quota_usage.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/quotas.md b/docs/zh/operations/system-tables/quotas.md new file mode 120000 index 00000000000..b6a26bf77f3 --- /dev/null +++ b/docs/zh/operations/system-tables/quotas.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quotas.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/quotas_usage.md b/docs/zh/operations/system-tables/quotas_usage.md new file mode 120000 index 00000000000..ba204a4d9c0 --- /dev/null +++ b/docs/zh/operations/system-tables/quotas_usage.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/quotas_usage.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/replicated_fetches.md b/docs/zh/operations/system-tables/replicated_fetches.md new file mode 120000 index 00000000000..bf4547ebd07 --- /dev/null +++ b/docs/zh/operations/system-tables/replicated_fetches.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/replicated_fetches.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/replication_queue.md b/docs/zh/operations/system-tables/replication_queue.md new file mode 120000 index 00000000000..cdc452594e6 --- /dev/null +++ b/docs/zh/operations/system-tables/replication_queue.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/replication_queue.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/role-grants.md b/docs/zh/operations/system-tables/role-grants.md new file mode 120000 index 00000000000..6a25ffa31ce --- /dev/null +++ b/docs/zh/operations/system-tables/role-grants.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/role-grants.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/roles.md b/docs/zh/operations/system-tables/roles.md new file mode 120000 index 00000000000..391bc980a48 --- /dev/null +++ b/docs/zh/operations/system-tables/roles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/roles.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/row_policies.md b/docs/zh/operations/system-tables/row_policies.md new file mode 120000 index 00000000000..b194161cf1d --- /dev/null +++ b/docs/zh/operations/system-tables/row_policies.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/row_policies.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/settings_profile_elements.md b/docs/zh/operations/system-tables/settings_profile_elements.md new file mode 120000 index 00000000000..3b0e70ead49 --- /dev/null +++ b/docs/zh/operations/system-tables/settings_profile_elements.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/settings_profile_elements.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/settings_profiles.md b/docs/zh/operations/system-tables/settings_profiles.md new file mode 120000 index 00000000000..1c559bf2445 --- /dev/null +++ b/docs/zh/operations/system-tables/settings_profiles.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/settings_profiles.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/stack_trace.md b/docs/zh/operations/system-tables/stack_trace.md new file mode 120000 index 00000000000..8dea20028f1 --- /dev/null +++ b/docs/zh/operations/system-tables/stack_trace.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/stack_trace.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/tables.md b/docs/zh/operations/system-tables/tables.md index d82911498ad..6a719a92ca0 100644 --- a/docs/zh/operations/system-tables/tables.md +++ b/docs/zh/operations/system-tables/tables.md @@ -55,4 +55,4 @@ machine_translated_rev: 5decc73b5dc60054f19087d3690c4eb99446a6c3 `system.tables` 表被用于 `SHOW TABLES` 的查询实现中。 -[原文](https://clickhouse.tech/docs/zh/operations/system-tables/tables) +[原文](https://clickhouse.com/docs/zh/operations/system-tables/tables) diff --git a/docs/zh/operations/system-tables/time_zones.md b/docs/zh/operations/system-tables/time_zones.md new file mode 120000 index 00000000000..d7b0f07d326 --- /dev/null +++ b/docs/zh/operations/system-tables/time_zones.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/time_zones.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/users.md b/docs/zh/operations/system-tables/users.md new file mode 120000 index 00000000000..540c5ac6620 --- /dev/null +++ b/docs/zh/operations/system-tables/users.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/users.md \ No newline at end of file diff --git a/docs/zh/operations/system-tables/zookeeper.md b/docs/zh/operations/system-tables/zookeeper.md index c25ce498460..70eedc7294e 100644 --- a/docs/zh/operations/system-tables/zookeeper.md +++ b/docs/zh/operations/system-tables/zookeeper.md @@ -77,4 +77,4 @@ numChildren: 7 pzxid: 987021252247 path: /clickhouse/tables/01-08/visits/replicas ``` -[原文](https://clickhouse.tech/docs/zh/operations/system-tables/zookeeper) +[原文](https://clickhouse.com/docs/zh/operations/system-tables/zookeeper) diff --git a/docs/zh/operations/system-tables/zookeeper_log.md b/docs/zh/operations/system-tables/zookeeper_log.md new file mode 120000 index 00000000000..c7db82e978a --- /dev/null +++ b/docs/zh/operations/system-tables/zookeeper_log.md @@ -0,0 +1 @@ +../../../en/operations/system-tables/zookeeper_log.md \ No newline at end of file diff --git a/docs/zh/operations/tips.md b/docs/zh/operations/tips.md index 6b46dbb5285..a4755086941 100644 --- a/docs/zh/operations/tips.md +++ b/docs/zh/operations/tips.md @@ -254,4 +254,4 @@ JAVA_OPTS="-Xms{{ '{{' }} cluster.get('xms','128M') {{ '}}' }} \ -Dzookeeper.root.logger=${ZOO_LOG4J_PROP} $ZOOMAIN $ZOOCFG end script -[原始文章](https://clickhouse.tech/docs/en/operations/tips/) +[原始文章](https://clickhouse.com/docs/en/operations/tips/) diff --git a/docs/zh/operations/utilities/clickhouse-compressor.md b/docs/zh/operations/utilities/clickhouse-compressor.md new file mode 120000 index 00000000000..98b1d8c4c7c --- /dev/null +++ b/docs/zh/operations/utilities/clickhouse-compressor.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-compressor.md \ No newline at end of file diff --git a/docs/zh/operations/utilities/clickhouse-copier.md b/docs/zh/operations/utilities/clickhouse-copier.md index 3dc29fe16fa..b68390fce04 100644 --- a/docs/zh/operations/utilities/clickhouse-copier.md +++ b/docs/zh/operations/utilities/clickhouse-copier.md @@ -168,4 +168,4 @@ clickhouse-copier --daemon --config zookeeper.xml --task-path /task/path --base- `clickhouse-copier` 跟踪更改 `/task/path/description` 并在飞行中应用它们。 例如,如果你改变的值 `max_workers`,运行任务的进程数也会发生变化。 -[原始文章](https://clickhouse.tech/docs/en/operations/utils/clickhouse-copier/) +[原始文章](https://clickhouse.com/docs/en/operations/utils/clickhouse-copier/) diff --git a/docs/zh/operations/utilities/clickhouse-format.md b/docs/zh/operations/utilities/clickhouse-format.md new file mode 120000 index 00000000000..d71a78cd40b --- /dev/null +++ b/docs/zh/operations/utilities/clickhouse-format.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-format.md \ No newline at end of file diff --git a/docs/zh/operations/utilities/clickhouse-local.md b/docs/zh/operations/utilities/clickhouse-local.md index 9b0ae841cd6..93df9b589e9 100644 --- a/docs/zh/operations/utilities/clickhouse-local.md +++ b/docs/zh/operations/utilities/clickhouse-local.md @@ -98,4 +98,4 @@ Read 186 rows, 4.15 KiB in 0.035 sec., 5302 rows/sec., 118.34 KiB/sec. ... ``` -[原始文章](https://clickhouse.tech/docs/en/operations/utils/clickhouse-local/) +[原始文章](https://clickhouse.com/docs/en/operations/utils/clickhouse-local/) diff --git a/docs/zh/operations/utilities/clickhouse-obfuscator.md b/docs/zh/operations/utilities/clickhouse-obfuscator.md new file mode 120000 index 00000000000..06d1df70693 --- /dev/null +++ b/docs/zh/operations/utilities/clickhouse-obfuscator.md @@ -0,0 +1 @@ +../../../en/operations/utilities/clickhouse-obfuscator.md \ No newline at end of file diff --git a/docs/zh/operations/utilities/index.md b/docs/zh/operations/utilities/index.md index 0d60fb8bbb9..ab65922c35c 100644 --- a/docs/zh/operations/utilities/index.md +++ b/docs/zh/operations/utilities/index.md @@ -4,4 +4,4 @@ - [跨集群复制](clickhouse-copier.md) — 在不同集群间复制数据。 - [性能测试](clickhouse-benchmark.md) — 连接到Clickhouse服务器,执行性能测试。 -[原始文章](https://clickhouse.tech/docs/en/operations/utils/) +[原始文章](https://clickhouse.com/docs/en/operations/utils/) diff --git a/docs/zh/operations/utilities/odbc-bridge.md b/docs/zh/operations/utilities/odbc-bridge.md new file mode 120000 index 00000000000..c5772389199 --- /dev/null +++ b/docs/zh/operations/utilities/odbc-bridge.md @@ -0,0 +1 @@ +../../../en/operations/utilities/odbc-bridge.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/combinators.md b/docs/zh/sql-reference/aggregate-functions/combinators.md index 6d1cd9c775c..9251e446f9e 100644 --- a/docs/zh/sql-reference/aggregate-functions/combinators.md +++ b/docs/zh/sql-reference/aggregate-functions/combinators.md @@ -240,4 +240,4 @@ FROM people └────────┴───────────────────────────┘ ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/agg_functions/combinators/) +[原始文章](https://clickhouse.com/docs/en/query_language/agg_functions/combinators/) diff --git a/docs/zh/sql-reference/aggregate-functions/index.md b/docs/zh/sql-reference/aggregate-functions/index.md index 2344c3e6dc0..ee42517db80 100644 --- a/docs/zh/sql-reference/aggregate-functions/index.md +++ b/docs/zh/sql-reference/aggregate-functions/index.md @@ -56,4 +56,4 @@ SELECT groupArray(y) FROM t_null_big 在 `groupArray` 生成的数组中不包括 `NULL`。 -[原始文章](https://clickhouse.tech/docs/en/query_language/agg_functions/) +[原始文章](https://clickhouse.com/docs/en/query_language/agg_functions/) diff --git a/docs/zh/sql-reference/aggregate-functions/parametric-functions.md b/docs/zh/sql-reference/aggregate-functions/parametric-functions.md index 468e8e9c76e..25ad72e6cf3 100644 --- a/docs/zh/sql-reference/aggregate-functions/parametric-functions.md +++ b/docs/zh/sql-reference/aggregate-functions/parametric-functions.md @@ -230,22 +230,24 @@ SELECT sequenceCount('(?1).*(?2)')(time, number = 1, number = 2) FROM t - 该函数搜索触发链中的第一个条件并将事件计数器设置为1。 这是滑动窗口启动的时刻。 -- 如果来自链的事件在窗口内顺序发生,则计数器将递增。 如果事件序列中断,则计数器不会增加。 +- 如果来自链的事件在窗口内顺序发生,则计数器将递增。 如果事件序列中断,则计数器不再增加。 - 如果数据在不同的完成点具有多个事件链,则该函数将仅输出最长链的大小。 **语法** ``` sql -windowFunnel(window, [mode])(timestamp, cond1, cond2, ..., condN) +windowFunnel(window, [mode, [mode, ... ]])(timestamp, cond1, cond2, ..., condN) ``` **参数** -- `window` — 滑动窗户的大小,单位是秒。 -- `mode` - 这是一个可选的参数。 - - `'strict'` - 当 `'strict'` 设置时,windowFunnel()仅对唯一值应用匹配条件。 -- `timestamp` — 包含时间的列。 数据类型支持: [日期](../../sql-reference/data-types/date.md), [日期时间](../../sql-reference/data-types/datetime.md#data_type-datetime) 和其他无符号整数类型(请注意,即使时间戳支持 `UInt64` 类型,它的值不能超过Int64最大值,即2^63-1)。 +- `window` — 滑动窗户的大小,表示事件链中第一个事件和最后一个事件的最大间隔。 单位取决于`timestamp `。用表达式来表示则是:`timestamp of cond1 <= timestamp of cond2 <= ... <= timestamp of condN <= timestamp of cond1 + window`。 +- `mode` - 这是一个可选的参数,可以设置一个或多个参数。 + - `'strict_deduplication'` - 如果事件链中出现相同的条件,则会停止进一步搜索。 + - `'strict_order'` - 不允许其他事件的介入。 例如:在`A->B->D->C`的情况下,它在`D`停止继续搜索`A->B->C`,最大事件数为2。 + - `'strict_increase'` - 事件链中的时间戳必须严格上升。 +- `timestamp` — 包含时间戳的列。 数据类型支持: [日期](../../sql-reference/data-types/date.md), [日期时间](../../sql-reference/data-types/datetime.md#data_type-datetime) 和其他无符号整数类型(请注意,即使时间戳支持 `UInt64` 类型,它的值也不能超过Int64最大值,即2^63-1)。 - `cond` — 事件链的约束条件。 [UInt8](../../sql-reference/data-types/int-uint.md) 类型。 **返回值** @@ -495,4 +497,4 @@ FROM 和 [sumMap](./reference/summap.md#agg_functions-summap) 基本一致, 除了一个键数组作为参数传递。这在使用高基数key时尤其有用。 -[原始文章](https://clickhouse.tech/docs/en/query_language/agg_functions/parametric_functions/) +[原始文章](https://clickhouse.com/docs/en/query_language/agg_functions/parametric_functions/) diff --git a/docs/zh/sql-reference/aggregate-functions/reference/deltasumtimestamp.md b/docs/zh/sql-reference/aggregate-functions/reference/deltasumtimestamp.md new file mode 120000 index 00000000000..3720d4f7b98 --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/deltasumtimestamp.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/deltasumtimestamp.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/intervalLengthSum.md b/docs/zh/sql-reference/aggregate-functions/reference/intervalLengthSum.md new file mode 120000 index 00000000000..b69019d0cf2 --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/intervalLengthSum.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/intervalLengthSum.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/quantilebfloat16.md b/docs/zh/sql-reference/aggregate-functions/reference/quantilebfloat16.md new file mode 120000 index 00000000000..dd4fd12eb40 --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/quantilebfloat16.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/quantilebfloat16.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/sumcount.md b/docs/zh/sql-reference/aggregate-functions/reference/sumcount.md new file mode 120000 index 00000000000..9f0299a5fe7 --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/sumcount.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sumcount.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/sumkahan.md b/docs/zh/sql-reference/aggregate-functions/reference/sumkahan.md new file mode 120000 index 00000000000..650f8a34d9d --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/sumkahan.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/sumkahan.md \ No newline at end of file diff --git a/docs/zh/sql-reference/aggregate-functions/reference/uniqthetasketch.md b/docs/zh/sql-reference/aggregate-functions/reference/uniqthetasketch.md new file mode 120000 index 00000000000..ac61a28677f --- /dev/null +++ b/docs/zh/sql-reference/aggregate-functions/reference/uniqthetasketch.md @@ -0,0 +1 @@ +../../../../en/sql-reference/aggregate-functions/reference/uniqthetasketch.md \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/aggregatefunction.md b/docs/zh/sql-reference/data-types/aggregatefunction.md index 522ecf1b42d..e6e07b02e11 100644 --- a/docs/zh/sql-reference/data-types/aggregatefunction.md +++ b/docs/zh/sql-reference/data-types/aggregatefunction.md @@ -60,4 +60,4 @@ SELECT uniqMerge(state) FROM (SELECT uniqState(UserID) AS state FROM table GROUP 请参阅 [AggregatingMergeTree](../../sql-reference/data-types/aggregatefunction.md) 的说明 -[来源文章](https://clickhouse.tech/docs/en/data_types/nested_data_structures/aggregatefunction/) +[来源文章](https://clickhouse.com/docs/en/data_types/nested_data_structures/aggregatefunction/) diff --git a/docs/zh/sql-reference/data-types/date32.md b/docs/zh/sql-reference/data-types/date32.md new file mode 120000 index 00000000000..2c8eca18107 --- /dev/null +++ b/docs/zh/sql-reference/data-types/date32.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/date32.md \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/domains/index.md b/docs/zh/sql-reference/data-types/domains/index.md index 1bcf8d31998..3bfb3707f53 100644 --- a/docs/zh/sql-reference/data-types/domains/index.md +++ b/docs/zh/sql-reference/data-types/domains/index.md @@ -29,6 +29,6 @@ Domain类型是特定实现的类型,它总是与某个现存的基础类型 - 当从其他列或表插入数据时,无法将string类型的值隐式地转换为Domain类型的值。 - 无法对存储为Domain类型的值添加约束。 -[来源文章](https://clickhouse.tech/docs/en/data_types/domains/overview) +[来源文章](https://clickhouse.com/docs/en/data_types/domains/overview) diff --git a/docs/zh/sql-reference/data-types/domains/ipv4.md b/docs/zh/sql-reference/data-types/domains/ipv4.md index 9ce12025405..2e027baf9b7 100644 --- a/docs/zh/sql-reference/data-types/domains/ipv4.md +++ b/docs/zh/sql-reference/data-types/domains/ipv4.md @@ -24,15 +24,15 @@ CREATE TABLE hits (url String, from IPv4) ENGINE = MergeTree() ORDER BY from; 在写入与查询时,`IPv4`类型能够识别可读性更加友好的输入输出格式: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.tech', '183.247.232.58')('https://clickhouse.tech/docs/en/', '116.106.34.242'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '116.253.40.133')('https://clickhouse.com', '183.247.232.58')('https://clickhouse.com/docs/en/', '116.106.34.242'); SELECT * FROM hits; ``` ┌─url────────────────────────────────┬───────────from─┐ - │ https://clickhouse.tech/docs/en/ │ 116.106.34.242 │ + │ https://clickhouse.com/docs/en/ │ 116.106.34.242 │ │ https://wikipedia.org │ 116.253.40.133 │ - │ https://clickhouse.tech │ 183.247.232.58 │ + │ https://clickhouse.com │ 183.247.232.58 │ └────────────────────────────────────┴────────────────┘ 同时它提供更为紧凑的二进制存储格式: @@ -65,4 +65,4 @@ SELECT toTypeName(i), CAST(from as UInt32) as i FROM hits LIMIT 1; │ UInt32 │ 3086477370 │ └──────────────────────────────────┴────────────┘ -[来源文章](https://clickhouse.tech/docs/en/data_types/domains/ipv4) +[来源文章](https://clickhouse.com/docs/en/data_types/domains/ipv4) diff --git a/docs/zh/sql-reference/data-types/domains/ipv6.md b/docs/zh/sql-reference/data-types/domains/ipv6.md index 5b1afc2cd39..6545aa61bc2 100644 --- a/docs/zh/sql-reference/data-types/domains/ipv6.md +++ b/docs/zh/sql-reference/data-types/domains/ipv6.md @@ -24,14 +24,14 @@ CREATE TABLE hits (url String, from IPv6) ENGINE = MergeTree() ORDER BY from; 在写入与查询时,`IPv6`类型能够识别可读性更加友好的输入输出格式: ``` sql -INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.tech', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.tech/docs/en/', '2a02:e980:1e::1'); +INSERT INTO hits (url, from) VALUES ('https://wikipedia.org', '2a02:aa08:e000:3100::2')('https://clickhouse.com', '2001:44c8:129:2632:33:0:252:2')('https://clickhouse.com/docs/en/', '2a02:e980:1e::1'); SELECT * FROM hits; ``` ┌─url────────────────────────────────┬─from──────────────────────────┐ - │ https://clickhouse.tech │ 2001:44c8:129:2632:33:0:252:2 │ - │ https://clickhouse.tech/docs/en/ │ 2a02:e980:1e::1 │ + │ https://clickhouse.com │ 2001:44c8:129:2632:33:0:252:2 │ + │ https://clickhouse.com/docs/en/ │ 2a02:e980:1e::1 │ │ https://wikipedia.org │ 2a02:aa08:e000:3100::2 │ └────────────────────────────────────┴───────────────────────────────┘ @@ -65,4 +65,4 @@ SELECT toTypeName(i), CAST(from as FixedString(16)) as i FROM hits LIMIT 1; │ FixedString(16) │ ��� │ └───────────────────────────────────────────┴─────────┘ -[来源文章](https://clickhouse.tech/docs/en/data_types/domains/ipv6) +[来源文章](https://clickhouse.com/docs/en/data_types/domains/ipv6) diff --git a/docs/zh/sql-reference/data-types/fixedstring.md b/docs/zh/sql-reference/data-types/fixedstring.md index f73259197c8..4e881b790b4 100644 --- a/docs/zh/sql-reference/data-types/fixedstring.md +++ b/docs/zh/sql-reference/data-types/fixedstring.md @@ -53,4 +53,4 @@ WHERE a = 'b\0' 请注意,`FixedString(N)`的长度是个常量。仅由空字符组成的字符串,函数[length](../../sql-reference/functions/array-functions.md#array_functions-length)返回值为`N`,而函数[empty](../../sql-reference/functions/string-functions.md#empty)的返回值为`1`。 -[来源文章](https://clickhouse.tech/docs/en/data_types/fixedstring/) +[来源文章](https://clickhouse.com/docs/en/data_types/fixedstring/) diff --git a/docs/zh/sql-reference/data-types/geo.md b/docs/zh/sql-reference/data-types/geo.md new file mode 120000 index 00000000000..e25bc66b201 --- /dev/null +++ b/docs/zh/sql-reference/data-types/geo.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/geo.md \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/lowcardinality.md b/docs/zh/sql-reference/data-types/lowcardinality.md index a0cd4c270c3..b8a1ac3c907 100644 --- a/docs/zh/sql-reference/data-types/lowcardinality.md +++ b/docs/zh/sql-reference/data-types/lowcardinality.md @@ -56,4 +56,4 @@ ORDER BY id - [高效低基数类型](https://www.altinity.com/blog/2019/3/27/low-cardinality). - [使用低基数类型减少ClickHouse的存储成本 – 来自Instana工程师的分享](https://www.instana.com/blog/reducing-clickhouse-storage-cost-with-the-low-cardinality-type-lessons-from-an-instana-engineer/). -- [字符优化 (俄语视频分享)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [英语分享](https://github.com/yandex/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). \ No newline at end of file +- [字符优化 (俄语视频分享)](https://youtu.be/rqf-ILRgBdY?list=PL0Z2YDlm0b3iwXCpEFiOOYmwXzVmjJfEt). [英语分享](https://github.com/ClickHouse/clickhouse-presentations/raw/master/meetup19/string_optimization.pdf). \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/map.md b/docs/zh/sql-reference/data-types/map.md new file mode 120000 index 00000000000..20de64e06d7 --- /dev/null +++ b/docs/zh/sql-reference/data-types/map.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/map.md \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/multiword-types.md b/docs/zh/sql-reference/data-types/multiword-types.md new file mode 120000 index 00000000000..aeb86eadd2b --- /dev/null +++ b/docs/zh/sql-reference/data-types/multiword-types.md @@ -0,0 +1 @@ +../../../en/sql-reference/data-types/multiword-types.md \ No newline at end of file diff --git a/docs/zh/sql-reference/data-types/nullable.md b/docs/zh/sql-reference/data-types/nullable.md index 8e8e9d3b0af..90fb302b713 100644 --- a/docs/zh/sql-reference/data-types/nullable.md +++ b/docs/zh/sql-reference/data-types/nullable.md @@ -38,4 +38,4 @@ SELECT x + y FROM t_null └────────────┘ ``` -[来源文章](https://clickhouse.tech/docs/en/data_types/nullable/) +[来源文章](https://clickhouse.com/docs/en/data_types/nullable/) diff --git a/docs/zh/sql-reference/data-types/simpleaggregatefunction.md b/docs/zh/sql-reference/data-types/simpleaggregatefunction.md index 38d7699c176..fc47f2c258a 100644 --- a/docs/zh/sql-reference/data-types/simpleaggregatefunction.md +++ b/docs/zh/sql-reference/data-types/simpleaggregatefunction.md @@ -38,4 +38,4 @@ CREATE TABLE simple (id UInt64, val SimpleAggregateFunction(sum, Double)) ENGINE=AggregatingMergeTree ORDER BY id; ``` -[原始文章](https://clickhouse.tech/docs/en/data_types/simpleaggregatefunction/) +[原始文章](https://clickhouse.com/docs/en/data_types/simpleaggregatefunction/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md index 2a890441085..0089dbc1f1c 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md @@ -67,4 +67,4 @@ ClickHouse支持 [等级](external-dicts-dict-structure.md#hierarchical-dict-att ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_hierarchical/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_hierarchical/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md index 190fd74d705..78d4c1ea236 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-layout.md @@ -399,4 +399,4 @@ dictGetString('prefix', 'asn', tuple(IPv6StringToNum('2001:db8::1'))) 数据存储在一个 `trie`. 它必须完全适合RAM。 -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_layout/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_layout/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md index af944fd9aea..a0bdab9e9ab 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-lifetime.md @@ -88,4 +88,4 @@ SOURCE(ODBC(... invalidate_query 'SELECT update_time FROM dictionary_source wher ... ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_lifetime/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_lifetime/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md new file mode 120000 index 00000000000..a8e9c37c515 --- /dev/null +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md @@ -0,0 +1 @@ +../../../../en/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-polygon.md \ No newline at end of file diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md index cbd88de0038..399224cb8c4 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md @@ -627,4 +627,4 @@ SOURCE(REDIS( - `storage_type` – The structure of internal Redis storage using for work with keys. `simple` 适用于简单源和散列单键源, `hash_map` 用于具有两个键的散列源。 不支持具有复杂键的范围源和缓存源。 可以省略,默认值为 `simple`. - `db_index` – The specific numeric index of Redis logical database. May be omitted, default value is 0. -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_sources/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_sources/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md index 91497a5767a..969e72aa0e2 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-structure.md @@ -172,4 +172,4 @@ CREATE DICTIONARY somename ( - [使用外部字典的函数](../../../sql-reference/functions/ext-dict-functions.md). -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict_structure/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict_structure/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md index 843b9a5aa41..ea4f9e192b7 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts-dict.md @@ -50,4 +50,4 @@ LIFETIME(...) -- Lifetime of dictionary in memory - [结构](external-dicts-dict-structure.md) — Structure of the dictionary . A key and attributes that can be retrieved by this key. - [使用寿命](external-dicts-dict-lifetime.md) — Frequency of dictionary updates. -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts_dict/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts_dict/) diff --git a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts.md b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts.md index 1dfea8d21be..609d1c11f56 100644 --- a/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts.md +++ b/docs/zh/sql-reference/dictionaries/external-dictionaries/external-dicts.md @@ -59,4 +59,4 @@ ClickHouse: - [字典键和字段](external-dicts-dict-structure.md) - [使用外部字典的函数](../../../sql-reference/functions/ext-dict-functions.md) -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/external_dicts/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/external_dicts/) diff --git a/docs/zh/sql-reference/dictionaries/index.md b/docs/zh/sql-reference/dictionaries/index.md index 092afd5bac1..ea71a1047c3 100644 --- a/docs/zh/sql-reference/dictionaries/index.md +++ b/docs/zh/sql-reference/dictionaries/index.md @@ -19,4 +19,4 @@ ClickHouse支持: - [内置字典](internal-dicts.md#internal_dicts) ,这些字典具有特定的 [函数集](../../sql-reference/functions/ym-dict-functions.md). - [插件(外部)字典](external-dictionaries/external-dicts.md#dicts-external-dicts) ,这些字典拥有一个 [函数集](../../sql-reference/functions/ext-dict-functions.md). -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/) diff --git a/docs/zh/sql-reference/dictionaries/internal-dicts.md b/docs/zh/sql-reference/dictionaries/internal-dicts.md index 706288e30ec..5bd09b673eb 100644 --- a/docs/zh/sql-reference/dictionaries/internal-dicts.md +++ b/docs/zh/sql-reference/dictionaries/internal-dicts.md @@ -52,4 +52,4 @@ Geobase从文本文件加载。 还有与操作系统标识符和Yandex的工作功能。Metrica搜索引擎,但他们不应该被使用。 -[原始文章](https://clickhouse.tech/docs/en/query_language/dicts/internal_dicts/) +[原始文章](https://clickhouse.com/docs/en/query_language/dicts/internal_dicts/) diff --git a/docs/zh/sql-reference/distributed-ddl.md b/docs/zh/sql-reference/distributed-ddl.md new file mode 100644 index 00000000000..e27b5d4d7d9 --- /dev/null +++ b/docs/zh/sql-reference/distributed-ddl.md @@ -0,0 +1,21 @@ +--- +toc_priority: 32 +toc_title: Distributed DDL +--- + +# 分布式DDL查询(ON CLUSTER条件) {#distributed-ddl-queries-on-cluster-clause} + +默认情况下,`CREATE`、`DROP`、`ALTER`和`RENAME`查询仅影响执行它们的当前服务器。 在集群设置中,可以使用`ON CLUSTER`子句以分布式方式运行此类查询。 + +例如,以下查询在`cluster`中的每个主机上创建`all_hits` `Distributed`表: + +``` sql +CREATE TABLE IF NOT EXISTS all_hits ON CLUSTER cluster (p Date, i Int32) ENGINE = Distributed(cluster, default, hits) +``` + +为了正确运行这些查询,每个主机必须具有相同的集群定义(为了简化同步配置,您可以使用ZooKeeper替换)。 他们还必须连接到ZooKeeper服务器。 + +本地版本的查询最终会在集群中的每台主机上执行,即使某些主机当前不可用。 + +!!! warning "警告" +在单个主机内执行查询的顺序是有保证的。 diff --git a/docs/zh/sql-reference/functions/arithmetic-functions.md b/docs/zh/sql-reference/functions/arithmetic-functions.md index 4cb02c99df4..36934211913 100644 --- a/docs/zh/sql-reference/functions/arithmetic-functions.md +++ b/docs/zh/sql-reference/functions/arithmetic-functions.md @@ -80,4 +80,4 @@ SELECT toTypeName(0), toTypeName(0 + 0), toTypeName(0 + 0 + 0), toTypeName(0 + 0 返回数值的最小公倍数。 除以零或将最小负数除以-1时抛出异常。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/arithmetic_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/arithmetic_functions/) diff --git a/docs/zh/sql-reference/functions/array-functions.md b/docs/zh/sql-reference/functions/array-functions.md index 4f6dbc0d87d..2a2b34da7e1 100644 --- a/docs/zh/sql-reference/functions/array-functions.md +++ b/docs/zh/sql-reference/functions/array-functions.md @@ -662,4 +662,4 @@ arrayReduce(‘agg_func’,arr1,…) - 将聚合函数`agg_func`应用 返回与源数组大小相同的数组,包含反转源数组的所有元素的结果。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/array_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/array_functions/) diff --git a/docs/zh/sql-reference/functions/array-join.md b/docs/zh/sql-reference/functions/array-join.md index b7a4855efa5..2bf3ca17764 100644 --- a/docs/zh/sql-reference/functions/array-join.md +++ b/docs/zh/sql-reference/functions/array-join.md @@ -25,4 +25,4 @@ SELECT arrayJoin([1, 2, 3] AS src) AS dst, 'Hello', src │ 3 │ Hello │ [1,2,3] │ └─────┴───────────┴─────────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/array_join/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/array_join/) diff --git a/docs/zh/sql-reference/functions/bit-functions.md b/docs/zh/sql-reference/functions/bit-functions.md index 08a6739c206..dd6958afec1 100644 --- a/docs/zh/sql-reference/functions/bit-functions.md +++ b/docs/zh/sql-reference/functions/bit-functions.md @@ -26,4 +26,4 @@ ## bitTestAny(a,b) {#bittestanya-b} -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/bit_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/bit_functions/) diff --git a/docs/zh/sql-reference/functions/bitmap-functions.md b/docs/zh/sql-reference/functions/bitmap-functions.md index c4c1b7293f6..2a6314e7727 100644 --- a/docs/zh/sql-reference/functions/bitmap-functions.md +++ b/docs/zh/sql-reference/functions/bitmap-functions.md @@ -405,4 +405,4 @@ SELECT bitmapAndnotCardinality(bitmapBuild([1,2,3]),bitmapBuild([3,4,5])) AS res │ 2 │ └─────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/bitmap_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/bitmap_functions/) diff --git a/docs/zh/sql-reference/functions/comparison-functions.md b/docs/zh/sql-reference/functions/comparison-functions.md index 8b5d72e64c2..77fed81f267 100644 --- a/docs/zh/sql-reference/functions/comparison-functions.md +++ b/docs/zh/sql-reference/functions/comparison-functions.md @@ -32,4 +32,4 @@ toc_title: 比较函数 ## 大于等于, >= 运算符 {#greaterorequals-operator} -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/comparison_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/comparison_functions/) diff --git a/docs/zh/sql-reference/functions/conditional-functions.md b/docs/zh/sql-reference/functions/conditional-functions.md index a804f723d6f..ce421138d0e 100644 --- a/docs/zh/sql-reference/functions/conditional-functions.md +++ b/docs/zh/sql-reference/functions/conditional-functions.md @@ -192,4 +192,4 @@ FROM LEFT_RIGHT └──────┴───────┴──────────────────┘ ``` -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/conditional_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/conditional_functions/) diff --git a/docs/zh/sql-reference/functions/date-time-functions.md b/docs/zh/sql-reference/functions/date-time-functions.md index 9f8e7f49d07..1225cf33699 100644 --- a/docs/zh/sql-reference/functions/date-time-functions.md +++ b/docs/zh/sql-reference/functions/date-time-functions.md @@ -652,7 +652,7 @@ SELECT formatDateTime(toDate('2010-01-04'), '%g') └────────────────────────────────────────────┘ ``` -[Original article](https://clickhouse.tech/docs/en/query_language/functions/date_time_functions/) +[Original article](https://clickhouse.com/docs/en/query_language/functions/date_time_functions/) ## FROM_UNIXTIME diff --git a/docs/zh/sql-reference/functions/encoding-functions.md b/docs/zh/sql-reference/functions/encoding-functions.md index e0daab15dd3..f1152965d2d 100644 --- a/docs/zh/sql-reference/functions/encoding-functions.md +++ b/docs/zh/sql-reference/functions/encoding-functions.md @@ -91,4 +91,4 @@ SELECT char(0xE4, 0xBD, 0xA0, 0xE5, 0xA5, 0xBD) AS hello; 接受一个整数。返回一个UInt64类型数组,其中包含一组2的幂列表,其列表中的所有值相加等于这个整数。数组中的数字按升序排列。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/encoding_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/encoding_functions/) diff --git a/docs/zh/sql-reference/functions/encryption-functions.md b/docs/zh/sql-reference/functions/encryption-functions.md new file mode 120000 index 00000000000..8d33d60a5ba --- /dev/null +++ b/docs/zh/sql-reference/functions/encryption-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/encryption-functions.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/ext-dict-functions.md b/docs/zh/sql-reference/functions/ext-dict-functions.md index 22ee9641b55..12b9499cb64 100644 --- a/docs/zh/sql-reference/functions/ext-dict-functions.md +++ b/docs/zh/sql-reference/functions/ext-dict-functions.md @@ -43,4 +43,4 @@ - 检查字典是否存在指定的`id`。如果不存在,则返回0;如果存在,则返回1。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/ext_dict_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/ext_dict_functions/) diff --git a/docs/zh/sql-reference/functions/files.md b/docs/zh/sql-reference/functions/files.md new file mode 120000 index 00000000000..df6eac6031e --- /dev/null +++ b/docs/zh/sql-reference/functions/files.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/files.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/functions-for-nulls.md b/docs/zh/sql-reference/functions/functions-for-nulls.md index 0fc563afa4c..b228cbe6f99 100644 --- a/docs/zh/sql-reference/functions/functions-for-nulls.md +++ b/docs/zh/sql-reference/functions/functions-for-nulls.md @@ -249,4 +249,4 @@ │ Nullable(UInt8) │ └────────────────────────────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/functions_for_nulls/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/functions_for_nulls/) diff --git a/docs/zh/sql-reference/functions/geo.md b/docs/zh/sql-reference/functions/geo.md index d3e7ba0619e..fa8fecb1284 100644 --- a/docs/zh/sql-reference/functions/geo.md +++ b/docs/zh/sql-reference/functions/geo.md @@ -219,4 +219,4 @@ SELECT geohashesInBox(24.48, 40.56, 24.785, 40.81, 4) AS thasos └─────────────────────────────────────────────┘ ``` -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/geo/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/geo/) diff --git a/docs/zh/sql-reference/functions/geo/coordinates.md b/docs/zh/sql-reference/functions/geo/coordinates.md new file mode 120000 index 00000000000..f3f694c50c9 --- /dev/null +++ b/docs/zh/sql-reference/functions/geo/coordinates.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/coordinates.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/geo/geohash.md b/docs/zh/sql-reference/functions/geo/geohash.md new file mode 120000 index 00000000000..5b17ac944bb --- /dev/null +++ b/docs/zh/sql-reference/functions/geo/geohash.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/geohash.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/geo/h3.md b/docs/zh/sql-reference/functions/geo/h3.md new file mode 120000 index 00000000000..eb3926f4e3e --- /dev/null +++ b/docs/zh/sql-reference/functions/geo/h3.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/h3.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/geo/index.md b/docs/zh/sql-reference/functions/geo/index.md new file mode 120000 index 00000000000..8eb51e63d5b --- /dev/null +++ b/docs/zh/sql-reference/functions/geo/index.md @@ -0,0 +1 @@ +../../../../en/sql-reference/functions/geo/index.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/hash-functions.md b/docs/zh/sql-reference/functions/hash-functions.md index b64456fe644..0800631a807 100644 --- a/docs/zh/sql-reference/functions/hash-functions.md +++ b/docs/zh/sql-reference/functions/hash-functions.md @@ -111,4 +111,4 @@ URL的层级与URLHierarchy中的层级相同。 此函数被用于Yandex.Metric 接受一个String类型的参数。返回UInt64或UInt32。 有关更多信息,请参见链接:[xxHash](http://cyan4973.github.io/xxHash/) -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/hash_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/hash_functions/) diff --git a/docs/zh/sql-reference/functions/higher-order-functions.md b/docs/zh/sql-reference/functions/higher-order-functions.md index fcf3ab3da15..dc5c99ae298 100644 --- a/docs/zh/sql-reference/functions/higher-order-functions.md +++ b/docs/zh/sql-reference/functions/higher-order-functions.md @@ -135,4 +135,4 @@ SELECT arrayReverseSort([1, nan, 2, NULL, 3, nan, 4, NULL]) │ [4,3,2,1,nan,nan,NULL,NULL] │ └──────────────────────────────────────────────────────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/higher_order_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/higher_order_functions/) diff --git a/docs/zh/sql-reference/functions/in-functions.md b/docs/zh/sql-reference/functions/in-functions.md index 1665bf5650e..bb33658cb68 100644 --- a/docs/zh/sql-reference/functions/in-functions.md +++ b/docs/zh/sql-reference/functions/in-functions.md @@ -21,4 +21,4 @@ toc_title: IN 运算符 ’N’是列索引,从1开始。N必须是正整数常量,并且不大于元组的大小。 执行该函数没有任何成本。 -[原始文章](https://clickhouse.tech/docs/en/query_language/functions/in_functions/) +[原始文章](https://clickhouse.com/docs/en/query_language/functions/in_functions/) diff --git a/docs/zh/sql-reference/functions/index.md b/docs/zh/sql-reference/functions/index.md index 52954c95cff..c5974e55582 100644 --- a/docs/zh/sql-reference/functions/index.md +++ b/docs/zh/sql-reference/functions/index.md @@ -69,4 +69,4 @@ ClickHouse中至少存在两种类型的函数 - 常规函数(它们称之为 如果查询中的函数在请求服务器上执行,但您需要在远程服务器上执行它,则可以将其包装在«any»聚合函数中,或将其添加到«GROUP BY»中。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/) diff --git a/docs/zh/sql-reference/functions/ip-address-functions.md b/docs/zh/sql-reference/functions/ip-address-functions.md index d208e0e6939..6428070e704 100644 --- a/docs/zh/sql-reference/functions/ip-address-functions.md +++ b/docs/zh/sql-reference/functions/ip-address-functions.md @@ -214,4 +214,4 @@ SELECT │ 20010438FFFF000000000000407D1BC1 │ 20010438FFFF000000000000407D1BC1 │ └───────────────────────────────────┴──────────────────────────────────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/ip_address_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/ip_address_functions/) diff --git a/docs/zh/sql-reference/functions/json-functions.md b/docs/zh/sql-reference/functions/json-functions.md index 441ec29a289..8459f2ceccc 100644 --- a/docs/zh/sql-reference/functions/json-functions.md +++ b/docs/zh/sql-reference/functions/json-functions.md @@ -171,4 +171,4 @@ select JSONExtractRaw('{"a": "hello", "b": [-100, 200.0, 300]}', 'b') = '[-100, 200.0, 300]' -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/json_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/json_functions/) diff --git a/docs/zh/sql-reference/functions/logical-functions.md b/docs/zh/sql-reference/functions/logical-functions.md index cc168dbb1ed..ad72161f3da 100644 --- a/docs/zh/sql-reference/functions/logical-functions.md +++ b/docs/zh/sql-reference/functions/logical-functions.md @@ -17,4 +17,4 @@ toc_title: 逻辑函数 ## 异或,`XOR` 运算符 {#xor} -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/logical_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/logical_functions/) diff --git a/docs/zh/sql-reference/functions/math-functions.md b/docs/zh/sql-reference/functions/math-functions.md index 6634b095b0d..5458ac37dfd 100644 --- a/docs/zh/sql-reference/functions/math-functions.md +++ b/docs/zh/sql-reference/functions/math-functions.md @@ -104,4 +104,4 @@ SELECT erf(3 / sqrt(2)) 接受一个数值类型的参数并返回它的10的x次幂(UInt64)。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/math_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/math_functions/) diff --git a/docs/zh/sql-reference/functions/nlp-functions.md b/docs/zh/sql-reference/functions/nlp-functions.md new file mode 120000 index 00000000000..612039dcb2c --- /dev/null +++ b/docs/zh/sql-reference/functions/nlp-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/nlp-functions.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/other-functions.md b/docs/zh/sql-reference/functions/other-functions.md index c58c4bd1510..2588f623227 100644 --- a/docs/zh/sql-reference/functions/other-functions.md +++ b/docs/zh/sql-reference/functions/other-functions.md @@ -631,4 +631,4 @@ ORDER BY k ASC 如果参数不为零则抛出异常。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/other_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/other_functions/) diff --git a/docs/zh/sql-reference/functions/random-functions.md b/docs/zh/sql-reference/functions/random-functions.md index f058b98c779..34ff2d9943a 100644 --- a/docs/zh/sql-reference/functions/random-functions.md +++ b/docs/zh/sql-reference/functions/random-functions.md @@ -18,4 +18,4 @@ 返回一个UInt32类型的随机数字,该函数不同之处在于仅为每个数据块参数一个随机数。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/random_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/random_functions/) diff --git a/docs/zh/sql-reference/functions/rounding-functions.md b/docs/zh/sql-reference/functions/rounding-functions.md index c1bf6641135..46f137da995 100644 --- a/docs/zh/sql-reference/functions/rounding-functions.md +++ b/docs/zh/sql-reference/functions/rounding-functions.md @@ -83,4 +83,4 @@ SELECT number / 2 AS x, round(x) FROM system.numbers LIMIT 3 接受一个数字,将其向下舍入到指定数组中的元素。如果该值小于数组中的最低边界,则返回最低边界。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/rounding_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/rounding_functions/) diff --git a/docs/zh/sql-reference/functions/splitting-merging-functions.md b/docs/zh/sql-reference/functions/splitting-merging-functions.md index a29f4057d55..ade5bae21da 100644 --- a/docs/zh/sql-reference/functions/splitting-merging-functions.md +++ b/docs/zh/sql-reference/functions/splitting-merging-functions.md @@ -26,4 +26,4 @@ │ ['abca','abc'] │ └─────────────────────────┘ -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/splitting_merging_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/splitting_merging_functions/) diff --git a/docs/zh/sql-reference/functions/string-functions.md b/docs/zh/sql-reference/functions/string-functions.md index 1c27176a45e..d4f8d36273d 100644 --- a/docs/zh/sql-reference/functions/string-functions.md +++ b/docs/zh/sql-reference/functions/string-functions.md @@ -166,4 +166,4 @@ SELECT format('{} {}', 'Hello', 'World') 返回一个字符串,用于删除任一侧的空白字符。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/string_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/string_functions/) diff --git a/docs/zh/sql-reference/functions/string-replace-functions.md b/docs/zh/sql-reference/functions/string-replace-functions.md index 5f89bfb828f..01bb809c78f 100644 --- a/docs/zh/sql-reference/functions/string-replace-functions.md +++ b/docs/zh/sql-reference/functions/string-replace-functions.md @@ -76,5 +76,5 @@ SELECT replaceRegexpAll('Hello, World!', '^', 'here: ') AS res 这个实现与re2::RE2::QuoteMeta略有不同。它以`\0` 转义零字节,而不是`\x00`,并且只转义必需的字符。 有关详细信息,请参阅链接:[RE2](https://github.com/google/re2/blob/master/re2/re2.cc#L473) -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/string_replace_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/string_replace_functions/) diff --git a/docs/zh/sql-reference/functions/string-search-functions.md b/docs/zh/sql-reference/functions/string-search-functions.md index 2e1e4c784bd..113c34788f7 100644 --- a/docs/zh/sql-reference/functions/string-search-functions.md +++ b/docs/zh/sql-reference/functions/string-search-functions.md @@ -119,4 +119,4 @@ !!! note "注意" 对于UTF-8,我们使用3-gram。所有这些都不是完全公平的n-gram距离。我们使用2字节哈希来散列n-gram,然后计算这些哈希表之间的(非)对称差异 - 可能会发生冲突。对于UTF-8不区分大小写的格式,我们不使用公平的`tolower`函数 - 我们将每个Unicode字符字节的第5位(从零开始)和字节的第一位归零 - 这适用于拉丁语,主要用于所有西里尔字母。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/string_search_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/string_search_functions/) diff --git a/docs/zh/sql-reference/functions/tuple-functions.md b/docs/zh/sql-reference/functions/tuple-functions.md new file mode 120000 index 00000000000..daaf22f11f4 --- /dev/null +++ b/docs/zh/sql-reference/functions/tuple-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/tuple-functions.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/tuple-map-functions.md b/docs/zh/sql-reference/functions/tuple-map-functions.md new file mode 120000 index 00000000000..e77338e1118 --- /dev/null +++ b/docs/zh/sql-reference/functions/tuple-map-functions.md @@ -0,0 +1 @@ +../../../en/sql-reference/functions/tuple-map-functions.md \ No newline at end of file diff --git a/docs/zh/sql-reference/functions/type-conversion-functions.md b/docs/zh/sql-reference/functions/type-conversion-functions.md index 4c94b2b2f9a..6c8843fe2bd 100644 --- a/docs/zh/sql-reference/functions/type-conversion-functions.md +++ b/docs/zh/sql-reference/functions/type-conversion-functions.md @@ -635,4 +635,4 @@ SELECT fromUnixTimestamp64Milli(i64, 'UTC') └──────────────────────────────────────┘ ``` -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/type_conversion_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/type_conversion_functions/) diff --git a/docs/zh/sql-reference/functions/url-functions.md b/docs/zh/sql-reference/functions/url-functions.md index a7b91c773c8..040bd1e6aae 100644 --- a/docs/zh/sql-reference/functions/url-functions.md +++ b/docs/zh/sql-reference/functions/url-functions.md @@ -115,4 +115,4 @@ SELECT decodeURLComponent('http://127.0.0.1:8123/?query=SELECT%201%3B') AS Decod 删除URL中名称为’name’的参数。改函数假设参数名称以及参数值经过URL相同的编码。 -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/url_functions/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/url_functions/) diff --git a/docs/zh/sql-reference/functions/uuid-functions.md b/docs/zh/sql-reference/functions/uuid-functions.md index fb7cdcc4eff..99f5c3407ef 100644 --- a/docs/zh/sql-reference/functions/uuid-functions.md +++ b/docs/zh/sql-reference/functions/uuid-functions.md @@ -104,4 +104,4 @@ SELECT - [dictgetuid](ext-dict-functions.md) -[来源文章](https://clickhouse.tech/docs/en/query_language/functions/uuid_function/) +[来源文章](https://clickhouse.com/docs/en/query_language/functions/uuid_function/) diff --git a/docs/zh/sql-reference/functions/ym-dict-functions.md b/docs/zh/sql-reference/functions/ym-dict-functions.md index 2f2b2f80d25..f8ac29e6d4c 100644 --- a/docs/zh/sql-reference/functions/ym-dict-functions.md +++ b/docs/zh/sql-reference/functions/ym-dict-functions.md @@ -139,4 +139,4 @@ regionToTopContinent(id[, geobase]) `ua` 和 `uk` 都意味着乌克兰。 -[原始文章](https://clickhouse.tech/docs/en/query_language/functions/ym_dict_functions/) +[原始文章](https://clickhouse.com/docs/en/query_language/functions/ym_dict_functions/) diff --git a/docs/zh/sql-reference/index.md b/docs/zh/sql-reference/index.md index c47c20b9cf9..5e75d670c1d 100644 --- a/docs/zh/sql-reference/index.md +++ b/docs/zh/sql-reference/index.md @@ -15,4 +15,4 @@ ClickHouse支持以下形式的查询: - [ALTER](statements/alter.md#query_language_queries_alter) - [其他类型的查询](statements/misc.md) -[原始文档](https://clickhouse.tech/docs/zh/sql-reference/) +[原始文档](https://clickhouse.com/docs/zh/sql-reference/) diff --git a/docs/zh/sql-reference/operators/in.md b/docs/zh/sql-reference/operators/in.md index f39bd02c309..d76971b0487 100644 --- a/docs/zh/sql-reference/operators/in.md +++ b/docs/zh/sql-reference/operators/in.md @@ -5,7 +5,7 @@ machine_translated_rev: 5decc73b5dc60054f19087d3690c4eb99446a6c3 # IN 操作符 {#select-in-operators} -该 `IN`, `NOT IN`, `GLOBAL IN`,和 `GLOBAL NOT IN` 运算符是单独复盖的,因为它们的功能相当丰富。 +该 `IN`, `NOT IN`, `GLOBAL IN`,和 `GLOBAL NOT IN` 运算符是单独考虑的,因为它们的功能相当丰富。 运算符的左侧是单列或元组。 diff --git a/docs/zh/sql-reference/operators/index.md b/docs/zh/sql-reference/operators/index.md index 77aa42755af..2b5555f6c66 100644 --- a/docs/zh/sql-reference/operators/index.md +++ b/docs/zh/sql-reference/operators/index.md @@ -260,4 +260,4 @@ WHERE isNotNull(y) 1 rows in set. Elapsed: 0.002 sec. ``` -[来源文章](https://clickhouse.tech/docs/en/query_language/operators/) +[来源文章](https://clickhouse.com/docs/en/query_language/operators/) diff --git a/docs/zh/sql-reference/statements/alter.md b/docs/zh/sql-reference/statements/alter.md index 81ef9124e45..db4db707832 100644 --- a/docs/zh/sql-reference/statements/alter.md +++ b/docs/zh/sql-reference/statements/alter.md @@ -586,4 +586,4 @@ ALTER SETTINGS PROFILE [IF EXISTS] name [ON CLUSTER cluster_name] [SETTINGS variable [= value] [MIN [=] min_value] [MAX [=] max_value] [READONLY|WRITABLE] | INHERIT 'profile_name'] [,...] ``` -[Original article](https://clickhouse.tech/docs/en/query_language/alter/) +[Original article](https://clickhouse.com/docs/en/query_language/alter/) diff --git a/docs/zh/sql-reference/statements/alter/column.md b/docs/zh/sql-reference/statements/alter/column.md new file mode 120000 index 00000000000..e1123d197fe --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/column.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/column.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/constraint.md b/docs/zh/sql-reference/statements/alter/constraint.md new file mode 120000 index 00000000000..e3b245408d1 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/constraint.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/constraint.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/delete.md b/docs/zh/sql-reference/statements/alter/delete.md new file mode 120000 index 00000000000..b9d6a233197 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/delete.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/delete.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/index.md b/docs/zh/sql-reference/statements/alter/index.md new file mode 100644 index 00000000000..2f60dbb262e --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/index.md @@ -0,0 +1,23 @@ +--- +toc_hidden_folder: true +toc_priority: 42 +toc_title: INDEX +--- + +# 操作数据跳过索引 {#manipulations-with-data-skipping-indices} + +可以使用以下操作: + +- `ALTER TABLE [db].name ADD INDEX name expression TYPE type GRANULARITY value [FIRST|AFTER name]` - 向表元数据添加索引描述。 + +- `ALTER TABLE [db].name DROP INDEX name` - 从表元数据中删除索引描述并从磁盘中删除索引文件。 + +- `ALTER TABLE [db.]table MATERIALIZE INDEX name IN PARTITION partition_name` - 查询在分区`partition_name`中重建二级索引`name`。 操作为[mutation](../../../sql-reference/statements/alter/index.md#mutations). + +前两个命令是轻量级的,它们只更改元数据或删除文件。 + +Also, they are replicated, syncing indices metadata via ZooKeeper. +此外,它们会被复制,会通过ZooKeeper同步索引元数据。 + +!!! note "注意" +索引操作仅支持具有以下特征的表 [`*MergeTree`](../../../engines/table-engines/mergetree-family/mergetree.md)引擎 (包括[replicated](../../../engines/table-engines/mergetree-family/replication.md)). diff --git a/docs/zh/sql-reference/statements/alter/index/index.md b/docs/zh/sql-reference/statements/alter/index/index.md new file mode 120000 index 00000000000..b754fa71b83 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/index/index.md @@ -0,0 +1 @@ +../../../../../en/sql-reference/statements/alter/index/index.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/order-by.md b/docs/zh/sql-reference/statements/alter/order-by.md new file mode 120000 index 00000000000..ef5a22dc165 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/order-by.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/order-by.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/partition.md b/docs/zh/sql-reference/statements/alter/partition.md new file mode 120000 index 00000000000..09a6fa34645 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/partition.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/partition.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/projection.md b/docs/zh/sql-reference/statements/alter/projection.md new file mode 120000 index 00000000000..b7365ec9fe4 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/projection.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/projection.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/quota.md b/docs/zh/sql-reference/statements/alter/quota.md new file mode 120000 index 00000000000..c6c477c3b61 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/quota.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/quota.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/role.md b/docs/zh/sql-reference/statements/alter/role.md new file mode 120000 index 00000000000..ce1f0a94eb3 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/role.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/role.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/row-policy.md b/docs/zh/sql-reference/statements/alter/row-policy.md new file mode 120000 index 00000000000..09ad2d301f3 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/row-policy.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/row-policy.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/sample-by.md b/docs/zh/sql-reference/statements/alter/sample-by.md new file mode 120000 index 00000000000..fda9d991f40 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/sample-by.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/sample-by.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/setting.md b/docs/zh/sql-reference/statements/alter/setting.md new file mode 120000 index 00000000000..12fdba11505 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/setting.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/setting.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/settings-profile.md b/docs/zh/sql-reference/statements/alter/settings-profile.md new file mode 120000 index 00000000000..0e71ac4e831 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/settings-profile.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/settings-profile.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/ttl.md b/docs/zh/sql-reference/statements/alter/ttl.md new file mode 120000 index 00000000000..94a112e7a17 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/ttl.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/ttl.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/update.md b/docs/zh/sql-reference/statements/alter/update.md new file mode 120000 index 00000000000..fa9be21c070 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/update.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/update.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/user.md b/docs/zh/sql-reference/statements/alter/user.md new file mode 120000 index 00000000000..9379ef3aaf6 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/user.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/user.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/alter/view.md b/docs/zh/sql-reference/statements/alter/view.md new file mode 120000 index 00000000000..89bdcee5912 --- /dev/null +++ b/docs/zh/sql-reference/statements/alter/view.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/alter/view.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/attach.md b/docs/zh/sql-reference/statements/attach.md new file mode 120000 index 00000000000..54672449823 --- /dev/null +++ b/docs/zh/sql-reference/statements/attach.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/attach.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/check-table.md b/docs/zh/sql-reference/statements/check-table.md new file mode 120000 index 00000000000..1ce3a05c6ea --- /dev/null +++ b/docs/zh/sql-reference/statements/check-table.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/check-table.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create.md b/docs/zh/sql-reference/statements/create.md index 46e82bd1733..21a3e28ebc4 100644 --- a/docs/zh/sql-reference/statements/create.md +++ b/docs/zh/sql-reference/statements/create.md @@ -244,7 +244,7 @@ SELECT a, b, c FROM (SELECT ...) 没有单独的删除视图的语法。如果要删除视图,请使用`DROP TABLE`。 -[来源文章](https://clickhouse.tech/docs/en/query_language/create/) +[来源文章](https://clickhouse.com/docs/en/query_language/create/) ## CREATE DICTIONARY {#create-dictionary-query} diff --git a/docs/zh/sql-reference/statements/create/database.md b/docs/zh/sql-reference/statements/create/database.md new file mode 100644 index 00000000000..569f4837e6f --- /dev/null +++ b/docs/zh/sql-reference/statements/create/database.md @@ -0,0 +1,29 @@ +--- +toc_priority: 35 +toc_title: DATABASE +--- + +# CREATE DATABASE {#query-language-create-database} + +创建数据库. + +``` sql +CREATE DATABASE [IF NOT EXISTS] db_name [ON CLUSTER cluster] [ENGINE = engine(...)] +``` + +## 条件 {#clauses} + +### IF NOT EXISTS {#if-not-exists} + +如果`db_name`数据库已经存在,则ClickHouse不会创建新数据库并且: + +- 如果指定了子句,则不会引发异常。 +- 如果未指定子句,则抛出异常。 + +### ON CLUSTER {#on-cluster} + +ClickHouse在指定集群的所有服务器上创建`db_name`数据库。 更多细节在 [Distributed DDL](../../../sql-reference/distributed-ddl.md) article. + +### ENGINE {#engine} + +[MySQL](../../../engines/database-engines/mysql.md) 允许您从远程MySQL服务器检索数据. 默认情况下,ClickHouse使用自己的[database engine](../../../engines/database-engines/index.md). 还有一个[lazy](../../../engines/database-engines/lazy.md)引擎. diff --git a/docs/zh/sql-reference/statements/create/dictionary.md b/docs/zh/sql-reference/statements/create/dictionary.md new file mode 120000 index 00000000000..e9eff6ba066 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/dictionary.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/dictionary.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/function.md b/docs/zh/sql-reference/statements/create/function.md new file mode 120000 index 00000000000..d41429cb260 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/function.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/function.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/index.md b/docs/zh/sql-reference/statements/create/index.md new file mode 100644 index 00000000000..d5d3e814023 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/index.md @@ -0,0 +1,13 @@ +--- +toc_folder_title: CREATE +toc_priority: 34 +toc_title: Overview +--- + +# CREATE语法 {#create-queries} + +CREATE语法包含以下子集: + +- [DATABASE](../../../sql-reference/statements/create/database.md) + +[原始文章](https://clickhouse.com/docs/zh/sql-reference/statements/create/) diff --git a/docs/zh/sql-reference/statements/create/quota.md b/docs/zh/sql-reference/statements/create/quota.md new file mode 120000 index 00000000000..f941b7bcdad --- /dev/null +++ b/docs/zh/sql-reference/statements/create/quota.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/quota.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/role.md b/docs/zh/sql-reference/statements/create/role.md new file mode 120000 index 00000000000..d48b490bb1f --- /dev/null +++ b/docs/zh/sql-reference/statements/create/role.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/role.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/row-policy.md b/docs/zh/sql-reference/statements/create/row-policy.md new file mode 120000 index 00000000000..383ef88ed1f --- /dev/null +++ b/docs/zh/sql-reference/statements/create/row-policy.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/row-policy.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/settings-profile.md b/docs/zh/sql-reference/statements/create/settings-profile.md new file mode 120000 index 00000000000..093dd9adcde --- /dev/null +++ b/docs/zh/sql-reference/statements/create/settings-profile.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/settings-profile.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/table.md b/docs/zh/sql-reference/statements/create/table.md new file mode 120000 index 00000000000..61a92816de6 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/table.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/table.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/user.md b/docs/zh/sql-reference/statements/create/user.md new file mode 120000 index 00000000000..5c4882bede7 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/user.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/create/user.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/create/view.md b/docs/zh/sql-reference/statements/create/view.md new file mode 100644 index 00000000000..da69860f068 --- /dev/null +++ b/docs/zh/sql-reference/statements/create/view.md @@ -0,0 +1,243 @@ +--- +toc_priority: 37 +toc_title: VIEW +--- + +# CREATE VIEW {#create-view} + +创建一个新视图。 有两种类型的视图:普通视图和物化视图。 + +## Normal {#normal} + +语法: + +``` sql +CREATE [OR REPLACE] VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] AS SELECT ... +``` + +普通视图不存储任何数据。 他们只是在每次访问时从另一个表执行读取。换句话说,普通视图只不过是一个保存的查询。 从视图中读取时,此保存的查询用作[FROM](../../../sql-reference/statements/select/from.md)子句中的子查询. + +例如,假设您已经创建了一个视图: + +``` sql +CREATE VIEW view AS SELECT ... +``` + +并写了一个查询: + +``` sql +SELECT a, b, c FROM view +``` + +这个查询完全等同于使用子查询: + +``` sql +SELECT a, b, c FROM (SELECT ...) +``` + +## Materialized {#materialized} + +``` sql +CREATE MATERIALIZED VIEW [IF NOT EXISTS] [db.]table_name [ON CLUSTER] [TO[db.]name] [ENGINE = engine] [POPULATE] AS SELECT ... +``` + +物化视图存储由相应的[SELECT](../../../sql-reference/statements/select/index.md)管理. + +创建不带`TO [db].[table]`的物化视图时,必须指定`ENGINE` – 用于存储数据的表引擎。 + +使用`TO [db].[table]` 创建物化视图时,不得使用`POPULATE`。 + +一个物化视图的实现是这样的:当向SELECT中指定的表插入数据时,插入数据的一部分被这个SELECT查询转换,结果插入到视图中。 + +!!! important "重要" +ClickHouse 中的物化视图更像是插入触发器。 如果视图查询中有一些聚合,则它仅应用于一批新插入的数据。 对源表现有数据的任何更改(如更新、删除、删除分区等)都不会更改物化视图。 + +如果指定`POPULATE`,则在创建视图时将现有表数据插入到视图中,就像创建一个`CREATE TABLE ... AS SELECT ...`一样。 否则,查询仅包含创建视图后插入表中的数据。 我们**不建议**使用POPULATE,因为在创建视图期间插入表中的数据不会插入其中。 + +`SELECT` 查询可以包含`DISTINCT`、`GROUP BY`、`ORDER BY`、`LIMIT`……请注意,相应的转换是在每个插入数据块上独立执行的。 例如,如果设置了`GROUP BY`,则在插入期间聚合数据,但仅在插入数据的单个数据包内。 数据不会被进一步聚合。 例外情况是使用独立执行数据聚合的`ENGINE`,例如`SummingMergeTree`。 + +在物化视图上执行[ALTER](../../../sql-reference/statements/alter/index.md)查询有局限性,因此可能不方便。 如果物化视图使用构造`TO [db.]name`,你可以`DETACH`视图,为目标表运行`ALTER`,然后`ATTACH`先前分离的(`DETACH`)视图。 + +请注意,物化视图受[optimize_on_insert](../../../operations/settings/settings.md#optimize-on-insert)设置的影响。 在插入视图之前合并数据。 + +视图看起来与普通表相同。 例如,它们列在1SHOW TABLES1查询的结果中。 + +删除视图,使用[DROP VIEW](../../../sql-reference/statements/drop.md#drop-view). `DROP TABLE`也适用于视图。 + +## Live View (实验性) {#live-view} + +!!! important "重要" +这是一项实验性功能,可能会在未来版本中以向后不兼容的方式进行更改。 +使用[allow_experimental_live_view](../../../operations/settings/settings.md#allow-experimental-live-view)设置启用实时视图和`WATCH`查询的使用。 输入命令`set allow_experimental_live_view = 1`。 + +```sql +CREATE LIVE VIEW [IF NOT EXISTS] [db.]table_name [WITH [TIMEOUT [value_in_sec] [AND]] [REFRESH [value_in_sec]]] AS SELECT ... +``` + +实时视图存储相应[SELECT](../../../sql-reference/statements/select/index.md)查询的结果,并在查询结果更改时随时更新。 查询结果以及与新数据结合所需的部分结果存储在内存中,为重复查询提供更高的性能。当使用[WATCH](../../../sql-reference/statements/watch.md)查询更改查询结果时,实时视图可以提供推送通知。 + +实时视图是通过插入到查询中指定的最里面的表来触发的。 + +实时视图的工作方式类似于分布式表中查询的工作方式。 但不是组合来自不同服务器的部分结果,而是将当前数据的部分结果与新数据的部分结果组合在一起。当实时视图查询包含子查询时,缓存的部分结果仅存储在最里面的子查询中。 + +!!! info "限制" +- [Table function](../../../sql-reference/table-functions/index.md)不支持作为最里面的表. +- 没有插入的表,例如[dictionary](../../../sql-reference/dictionaries/index.md), [system table](../../../operations/system-tables/index.md), [normal view](#normal), [materialized view](#materialized)不会触发实时视图。 +- 只有可以将旧数据的部分结果与新数据的部分结果结合起来的查询才有效。 实时视图不适用于需要完整数据集来计算最终结果或必须保留聚合状态的聚合的查询。 +- 不适用于在不同节点上执行插入的复制或分布式表。 +- 不能被多个表触发。 + + [WITH REFRESH](#live-view-with-refresh)强制定期更新实时视图,在某些情况下可以用作解决方法。 + +### Monitoring Changes {#live-view-monitoring} + +您可以使用[WATCH](../../../sql-reference/statements/watch.md)命令监视`LIVE VIEW`查询结果的变化 + +```sql +WATCH [db.]live_view +``` + +**示例:** + +```sql +CREATE TABLE mt (x Int8) Engine = MergeTree ORDER BY x; +CREATE LIVE VIEW lv AS SELECT sum(x) FROM mt; +``` +在对源表进行并行插入时观看实时视图。 + +```sql +WATCH lv; +``` + +```bash +┌─sum(x)─┬─_version─┐ +│ 1 │ 1 │ +└────────┴──────────┘ +┌─sum(x)─┬─_version─┐ +│ 2 │ 2 │ +└────────┴──────────┘ +┌─sum(x)─┬─_version─┐ +│ 6 │ 3 │ +└────────┴──────────┘ +... +``` + +```sql +INSERT INTO mt VALUES (1); +INSERT INTO mt VALUES (2); +INSERT INTO mt VALUES (3); +``` + +添加[EVENTS](../../../sql-reference/statements/watch.md#events-clause)子句只获取更改事件。 + +```sql +WATCH [db.]live_view EVENTS; +``` + +**示例:** + +```sql +WATCH lv EVENTS; +``` + +```bash +┌─version─┐ +│ 1 │ +└─────────┘ +┌─version─┐ +│ 2 │ +└─────────┘ +┌─version─┐ +│ 3 │ +└─────────┘ +... +``` + +你可以执行[SELECT](../../../sql-reference/statements/select/index.md)与任何常规视图或表格相同的方式查询实时视图。如果查询结果被缓存,它将立即返回结果而不在基础表上运行存储的查询。 + +```sql +SELECT * FROM [db.]live_view WHERE ... +``` + +### Force Refresh {#live-view-alter-refresh} + +您可以使用`ALTER LIVE VIEW [db.]table_name REFRESH`语法. + +### WITH TIMEOUT条件 {#live-view-with-timeout} + +当使用`WITH TIMEOUT`子句创建实时视图时,[WATCH](../../../sql-reference/statements/watch.md)观察实时视图的查询。 + +```sql +CREATE LIVE VIEW [db.]table_name WITH TIMEOUT [value_in_sec] AS SELECT ... +``` + +如果未指定超时值,则由指定的值[temporary_live_view_timeout](../../../operations/settings/settings.md#temporary-live-view-timeout)决定. + +**示例:** + +```sql +CREATE TABLE mt (x Int8) Engine = MergeTree ORDER BY x; +CREATE LIVE VIEW lv WITH TIMEOUT 15 AS SELECT sum(x) FROM mt; +``` + +### WITH REFRESH条件 {#live-view-with-refresh} + +当使用`WITH REFRESH`子句创建实时视图时,它将在自上次刷新或触发后经过指定的秒数后自动刷新。 + +```sql +CREATE LIVE VIEW [db.]table_name WITH REFRESH [value_in_sec] AS SELECT ... +``` + +如果未指定刷新值,则由指定的值[periodic_live_view_refresh](../../../operations/settings/settings.md#periodic-live-view-refresh)决定. + +**示例:** + +```sql +CREATE LIVE VIEW lv WITH REFRESH 5 AS SELECT now(); +WATCH lv +``` + +```bash +┌───────────────now()─┬─_version─┐ +│ 2021-02-21 08:47:05 │ 1 │ +└─────────────────────┴──────────┘ +┌───────────────now()─┬─_version─┐ +│ 2021-02-21 08:47:10 │ 2 │ +└─────────────────────┴──────────┘ +┌───────────────now()─┬─_version─┐ +│ 2021-02-21 08:47:15 │ 3 │ +└─────────────────────┴──────────┘ +``` + +您可以使用`AND`子句组合`WITH TIMEOUT`和`WITH REFRESH`子句。 + +```sql +CREATE LIVE VIEW [db.]table_name WITH TIMEOUT [value_in_sec] AND REFRESH [value_in_sec] AS SELECT ... +``` + +**示例:** + +```sql +CREATE LIVE VIEW lv WITH TIMEOUT 15 AND REFRESH 5 AS SELECT now(); +``` + +15 秒后,如果没有活动的`WATCH`查询,实时视图将自动删除。 + +```sql +WATCH lv +``` + +``` +Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Table default.lv does not exist.. +``` + +### Usage {#live-view-usage} + +实时视图表的最常见用途包括: + +- 为查询结果更改提供推送通知以避免轮询。 +- 缓存最频繁查询的结果以提供即时查询结果。 +- 监视表更改并触发后续选择查询。 +- 使用定期刷新从系统表中查看指标。 + +[原始文章](https://clickhouse.com/docs/en/sql-reference/statements/create/view/) diff --git a/docs/zh/sql-reference/statements/describe-table.md b/docs/zh/sql-reference/statements/describe-table.md new file mode 120000 index 00000000000..eb76534f3cd --- /dev/null +++ b/docs/zh/sql-reference/statements/describe-table.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/describe-table.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/detach.md b/docs/zh/sql-reference/statements/detach.md new file mode 120000 index 00000000000..19d37ee535a --- /dev/null +++ b/docs/zh/sql-reference/statements/detach.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/detach.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/drop.md b/docs/zh/sql-reference/statements/drop.md new file mode 100644 index 00000000000..c78cb450e19 --- /dev/null +++ b/docs/zh/sql-reference/statements/drop.md @@ -0,0 +1,100 @@ +--- +toc_priority: 44 +toc_title: DROP +--- + +# DROP语法 {#drop} + +删除现有实体。 如果指定了`IF EXISTS`子句,如果实体不存在,这些查询不会返回错误。 + +## DROP DATABASE {#drop-database} + +删除`db`数据库中的所有表,然后删除`db`数据库本身。 + +语法: + +``` sql +DROP DATABASE [IF EXISTS] db [ON CLUSTER cluster] +``` + +## DROP TABLE {#drop-table} + +删除数据表 + +语法: + +``` sql +DROP [TEMPORARY] TABLE [IF EXISTS] [db.]name [ON CLUSTER cluster] +``` + +## DROP DICTIONARY {#drop-dictionary} + +删除字典。 + +语法: + +``` sql +DROP DICTIONARY [IF EXISTS] [db.]name +``` + +## DROP USER {#drop-user-statement} + +删除用户. + +语法: + +``` sql +DROP USER [IF EXISTS] name [,...] [ON CLUSTER cluster_name] +``` + +## DROP ROLE {#drop-role-statement} + +删除角色。删除的角色将从分配给它的所有实体中撤消。 + +语法: + +``` sql +DROP ROLE [IF EXISTS] name [,...] [ON CLUSTER cluster_name] +``` + +## DROP ROW POLICY {#drop-row-policy-statement} + +删除行策略。 删除的行策略从分配到它的所有实体中撤消。 + +语法: + +``` sql +DROP [ROW] POLICY [IF EXISTS] name [,...] ON [database.]table [,...] [ON CLUSTER cluster_name] +``` + +## DROP QUOTA {#drop-quota-statement} + +Deletes a quota. The deleted quota is revoked from all the entities where it was assigned. + +语法: + +``` sql +DROP QUOTA [IF EXISTS] name [,...] [ON CLUSTER cluster_name] +``` + +## DROP SETTINGS PROFILE {#drop-settings-profile-statement} + +删除配置文件。 已删除的设置配置文件将从分配给它的所有实体中撤销。 + +语法: + +``` sql +DROP [SETTINGS] PROFILE [IF EXISTS] name [,...] [ON CLUSTER cluster_name] +``` + +## DROP VIEW {#drop-view} + +删除视图。 视图也可以通过`DROP TABLE`命令删除,但`DROP VIEW`会检查`[db.]name`是否是一个视图。 + +语法: + +``` sql +DROP VIEW [IF EXISTS] [db.]name [ON CLUSTER cluster] +``` + +[原始文章](https://clickhouse.com/docs/zh/sql-reference/statements/drop/) diff --git a/docs/zh/sql-reference/statements/exchange.md b/docs/zh/sql-reference/statements/exchange.md new file mode 100644 index 00000000000..b19e05e896f --- /dev/null +++ b/docs/zh/sql-reference/statements/exchange.md @@ -0,0 +1,42 @@ +--- +toc_priority: 49 +toc_title: EXCHANGE +--- + +# EXCHANGE语法 {#exchange} + +以原子方式交换两个表或字典的名称。 +此任务也可以通过使用[RENAME](./rename.md)来完成,但在这种情况下操作不是原子的。 + +!!! note "注意" +`EXCHANGE`仅支持[Atomic](../../engines/database-engines/atomic.md)数据库引擎. + +**语法** + +```sql +EXCHANGE TABLES|DICTIONARIES [db0.]name_A AND [db1.]name_B +``` + +## EXCHANGE TABLES {#exchange_tables} + +交换两个表的名称。 + +**语法** + +```sql +EXCHANGE TABLES [db0.]table_A AND [db1.]table_B +``` + +## EXCHANGE DICTIONARIES {#exchange_dictionaries} + +交换两个字典的名称。 + +**语法** + +```sql +EXCHANGE DICTIONARIES [db0.]dict_A AND [db1.]dict_B +``` + +**参考** + +- [Dictionaries](../../sql-reference/dictionaries/index.md) diff --git a/docs/zh/sql-reference/statements/exists.md b/docs/zh/sql-reference/statements/exists.md new file mode 120000 index 00000000000..d69e8224fe6 --- /dev/null +++ b/docs/zh/sql-reference/statements/exists.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/exists.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/explain.md b/docs/zh/sql-reference/statements/explain.md new file mode 120000 index 00000000000..36f1f2cc9d4 --- /dev/null +++ b/docs/zh/sql-reference/statements/explain.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/explain.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/grant.md b/docs/zh/sql-reference/statements/grant.md index cb3952767ac..c55eff4126d 100644 --- a/docs/zh/sql-reference/statements/grant.md +++ b/docs/zh/sql-reference/statements/grant.md @@ -471,4 +471,4 @@ GRANT INSERT(x,y) ON db.table TO john `ADMIN OPTION` 权限允许用户将他们的角色分配给其它用户 -[原始文档](https://clickhouse.tech/docs/en/query_language/grant/) +[原始文档](https://clickhouse.com/docs/en/query_language/grant/) diff --git a/docs/zh/sql-reference/statements/insert-into.md b/docs/zh/sql-reference/statements/insert-into.md index 3e378c6a589..928107fa2b2 100644 --- a/docs/zh/sql-reference/statements/insert-into.md +++ b/docs/zh/sql-reference/statements/insert-into.md @@ -108,4 +108,4 @@ INSERT INTO [db.]table [(c1, c2, c3)] SELECT ... - 数据总是被实时的写入。 - 写入的数据已经按照时间排序。 -[来源文章](https://clickhouse.tech/docs/en/query_language/insert_into/) +[来源文章](https://clickhouse.com/docs/en/query_language/insert_into/) diff --git a/docs/zh/sql-reference/statements/kill.md b/docs/zh/sql-reference/statements/kill.md new file mode 120000 index 00000000000..1afbc9008f3 --- /dev/null +++ b/docs/zh/sql-reference/statements/kill.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/kill.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/misc.md b/docs/zh/sql-reference/statements/misc.md index 5ec589c9e9a..8e7fc4c6bc3 100644 --- a/docs/zh/sql-reference/statements/misc.md +++ b/docs/zh/sql-reference/statements/misc.md @@ -376,4 +376,4 @@ USE db 当前数据库用于搜索表,如果数据库没有在查询中明确定义与表名之前的点。 使用HTTP协议时无法进行此查询,因为没有会话的概念。 -[原始文章](https://clickhouse.tech/docs/en/query_language/misc/) +[原始文章](https://clickhouse.com/docs/en/query_language/misc/) diff --git a/docs/zh/sql-reference/statements/optimize.md b/docs/zh/sql-reference/statements/optimize.md new file mode 120000 index 00000000000..4f47d7273c5 --- /dev/null +++ b/docs/zh/sql-reference/statements/optimize.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/optimize.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/rename.md b/docs/zh/sql-reference/statements/rename.md new file mode 100644 index 00000000000..f921e4a41f3 --- /dev/null +++ b/docs/zh/sql-reference/statements/rename.md @@ -0,0 +1,61 @@ +--- +toc_priority: 48 +toc_title: RENAME +--- + +# RENAME语法 {#misc_operations-rename} + +重命名数据库、表或字典。 可以在单个查询中重命名多个实体。 +请注意,具有多个实体的`RENAME`查询是非原子操作。 要以原子方式交换实体名称,请使用[EXCHANGE](./exchange.md)语法. + +!!! note "注意" +`RENAME`仅支持[Atomic](../../engines/database-engines/atomic.md)数据库引擎. + +**语法** + +```sql +RENAME DATABASE|TABLE|DICTIONARY name TO new_name [,...] [ON CLUSTER cluster] +``` + +## RENAME DATABASE {#misc_operations-rename_database} + +重命名数据库. + +**语法** + +```sql +RENAME DATABASE atomic_database1 TO atomic_database2 [,...] [ON CLUSTER cluster] +``` + +## RENAME TABLE {#misc_operations-rename_table} + +重命名一个或多个表 + +重命名表是一个轻量级的操作。 如果在`TO`之后传递一个不同的数据库,该表将被移动到这个数据库。 但是,包含数据库的目录必须位于同一文件系统中。 否则,返回错误。 +如果在一个查询中重命名多个表,则该操作不是原子操作。 可能会部分执行,其他会话中可能会得到`Table ... does not exist ...`错误。 + +**语法** + +``` sql +RENAME TABLE [db1.]name1 TO [db2.]name2 [,...] [ON CLUSTER cluster] +``` + +**示例** + +```sql +RENAME TABLE table_A TO table_A_bak, table_B TO table_B_bak; +``` + +## RENAME DICTIONARY {#rename_dictionary} + +重命名一个或多个词典。 此查询可用于在数据库之间移动字典。 + +**语法** + +```sql +RENAME DICTIONARY [db0.]dict_A TO [db1.]dict_B [,...] [ON CLUSTER cluster] +``` + +**参考** + +- [Dictionaries](../../sql-reference/dictionaries/index.md) diff --git a/docs/zh/sql-reference/statements/revoke.md b/docs/zh/sql-reference/statements/revoke.md index f784b134a3b..16315ae96d4 100644 --- a/docs/zh/sql-reference/statements/revoke.md +++ b/docs/zh/sql-reference/statements/revoke.md @@ -45,4 +45,4 @@ GRANT SELECT ON accounts.staff TO mira; REVOKE SELECT(wage) ON accounts.staff FROM mira; ``` -{## [原始文档](https://clickhouse.tech/docs/en/operations/settings/settings/) ##} +{## [原始文档](https://clickhouse.com/docs/en/operations/settings/settings/) ##} diff --git a/docs/zh/sql-reference/statements/select/index.md b/docs/zh/sql-reference/statements/select/index.md index d3de71efc6b..6c8cc361844 100644 --- a/docs/zh/sql-reference/statements/select/index.md +++ b/docs/zh/sql-reference/statements/select/index.md @@ -159,4 +159,4 @@ Code: 42. DB::Exception: Received from localhost:9000. DB::Exception: Number of 有关详细信息,请参阅部分 “Settings”. 可以使用外部排序(将临时表保存到磁盘)和外部聚合。 -{## [原始文章](https://clickhouse.tech/docs/en/sql-reference/statements/select/) ##} +{## [原始文章](https://clickhouse.com/docs/en/sql-reference/statements/select/) ##} diff --git a/docs/zh/sql-reference/statements/select/offset.md b/docs/zh/sql-reference/statements/select/offset.md new file mode 120000 index 00000000000..b12b5219dec --- /dev/null +++ b/docs/zh/sql-reference/statements/select/offset.md @@ -0,0 +1 @@ +../../../../en/sql-reference/statements/select/offset.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/set-role.md b/docs/zh/sql-reference/statements/set-role.md new file mode 120000 index 00000000000..a6525622a68 --- /dev/null +++ b/docs/zh/sql-reference/statements/set-role.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/set-role.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/set.md b/docs/zh/sql-reference/statements/set.md new file mode 120000 index 00000000000..02e106afc9f --- /dev/null +++ b/docs/zh/sql-reference/statements/set.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/set.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/show.md b/docs/zh/sql-reference/statements/show.md index d9f09855916..85c5744f26b 100644 --- a/docs/zh/sql-reference/statements/show.md +++ b/docs/zh/sql-reference/statements/show.md @@ -165,4 +165,4 @@ SHOW CREATE QUOTA [name | CURRENT] SHOW CREATE [SETTINGS] PROFILE name ``` -[原始文档](https://clickhouse.tech/docs/en/query_language/show/) +[原始文档](https://clickhouse.com/docs/en/query_language/show/) diff --git a/docs/zh/sql-reference/statements/system.md b/docs/zh/sql-reference/statements/system.md index 7f2b7ae1082..9b21ba340a9 100644 --- a/docs/zh/sql-reference/statements/system.md +++ b/docs/zh/sql-reference/statements/system.md @@ -280,4 +280,4 @@ SYSTEM RESTART REPLICA [db.]replicated_merge_tree_family_table_name 重置所有 `ReplicatedMergeTree`表的ZooKeeper会话状态。该操作会以Zookeeper为参照,对比当前状态,有需要的情况下将任务添加到ZooKeeper队列。 -[原始文档](https://clickhouse.tech/docs/en/query_language/system/) +[原始文档](https://clickhouse.com/docs/en/query_language/system/) diff --git a/docs/zh/sql-reference/statements/truncate.md b/docs/zh/sql-reference/statements/truncate.md new file mode 120000 index 00000000000..92fbd705e8f --- /dev/null +++ b/docs/zh/sql-reference/statements/truncate.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/truncate.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/use.md b/docs/zh/sql-reference/statements/use.md new file mode 120000 index 00000000000..7bdbf049326 --- /dev/null +++ b/docs/zh/sql-reference/statements/use.md @@ -0,0 +1 @@ +../../../en/sql-reference/statements/use.md \ No newline at end of file diff --git a/docs/zh/sql-reference/statements/watch.md b/docs/zh/sql-reference/statements/watch.md new file mode 100644 index 00000000000..5f05eda811f --- /dev/null +++ b/docs/zh/sql-reference/statements/watch.md @@ -0,0 +1,4 @@ +--- +toc_priority: 53 +toc_title: WATCH +--- diff --git a/docs/zh/sql-reference/syntax.md b/docs/zh/sql-reference/syntax.md index 644dc646726..7721699e699 100644 --- a/docs/zh/sql-reference/syntax.md +++ b/docs/zh/sql-reference/syntax.md @@ -54,7 +54,7 @@ ClickHouse支持SQL风格或C语言风格的注释: - 集群、数据库、表、分区、列的名称 - 函数 - 数据类型 -- [表达式别名](https://clickhouse.tech/docs/zh/sql-reference/syntax/#syntax-expression_aliases) +- [表达式别名](https://clickhouse.com/docs/zh/sql-reference/syntax/#syntax-expression_aliases) 变量名可以被括起或不括起,后者是推荐做法。 @@ -192,4 +192,4 @@ select查询中,星号可以代替表达式使用。详情请参见“select 表达式列表是用逗号分隔的一个或多个表达式。 反过来,函数和运算符可以将表达式作为参数。 -[原始文档](https://clickhouse.tech/docs/en/sql_reference/syntax/) +[原始文档](https://clickhouse.com/docs/en/sql_reference/syntax/) diff --git a/docs/zh/sql-reference/table-functions/cluster.md b/docs/zh/sql-reference/table-functions/cluster.md new file mode 120000 index 00000000000..4721debec48 --- /dev/null +++ b/docs/zh/sql-reference/table-functions/cluster.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/cluster.md \ No newline at end of file diff --git a/docs/zh/sql-reference/table-functions/dictionary.md b/docs/zh/sql-reference/table-functions/dictionary.md new file mode 120000 index 00000000000..f9f453831a4 --- /dev/null +++ b/docs/zh/sql-reference/table-functions/dictionary.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/dictionary.md \ No newline at end of file diff --git a/docs/zh/sql-reference/table-functions/file.md b/docs/zh/sql-reference/table-functions/file.md index 84fddada867..dd2b83d292a 100644 --- a/docs/zh/sql-reference/table-functions/file.md +++ b/docs/zh/sql-reference/table-functions/file.md @@ -127,6 +127,6 @@ FROM file('big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name String, value UInt32') **另请参阅** -- [虚拟列](https://clickhouse.tech/docs/en/operations/table_engines/#table_engines-virtual_columns) +- [虚拟列](https://clickhouse.com/docs/en/operations/table_engines/#table_engines-virtual_columns) -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/file/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/file/) diff --git a/docs/zh/sql-reference/table-functions/generate.md b/docs/zh/sql-reference/table-functions/generate.md index b9b02793cf3..b00d1ecf1ab 100644 --- a/docs/zh/sql-reference/table-functions/generate.md +++ b/docs/zh/sql-reference/table-functions/generate.md @@ -39,4 +39,4 @@ SELECT * FROM generateRandom('a Array(Int8), d Decimal32(4), c Tuple(DateTime64( └──────────┴──────────────┴────────────────────────────────────────────────────────────────────┘ ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/generate/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/generate/) diff --git a/docs/zh/sql-reference/table-functions/hdfs.md b/docs/zh/sql-reference/table-functions/hdfs.md index 715d9671dc8..5fc5c0b4c62 100644 --- a/docs/zh/sql-reference/table-functions/hdfs.md +++ b/docs/zh/sql-reference/table-functions/hdfs.md @@ -97,6 +97,6 @@ FROM hdfs('hdfs://hdfs1:9000/big_dir/file{0..9}{0..9}{0..9}', 'CSV', 'name Strin **另请参阅** -- [虚拟列](https://clickhouse.tech/docs/en/operations/table_engines/#table_engines-virtual_columns) +- [虚拟列](https://clickhouse.com/docs/en/operations/table_engines/#table_engines-virtual_columns) -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/hdfs/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/hdfs/) diff --git a/docs/zh/sql-reference/table-functions/index.md b/docs/zh/sql-reference/table-functions/index.md index 20a335de0fc..a04c20c875d 100644 --- a/docs/zh/sql-reference/table-functions/index.md +++ b/docs/zh/sql-reference/table-functions/index.md @@ -33,4 +33,4 @@ toc_title: "\u5BFC\u8A00" | [odbc](../../sql-reference/table-functions/odbc.md) | 创建一个ODBC引擎表。 | | [hdfs](../../sql-reference/table-functions/hdfs.md) | 创建一个HDFS引擎表。 | -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/) diff --git a/docs/zh/sql-reference/table-functions/input.md b/docs/zh/sql-reference/table-functions/input.md index 61bb58d73e2..bfee05eb898 100644 --- a/docs/zh/sql-reference/table-functions/input.md +++ b/docs/zh/sql-reference/table-functions/input.md @@ -40,4 +40,4 @@ $ cat data.csv | clickhouse-client --query="INSERT INTO test FORMAT CSV" $ cat data.csv | clickhouse-client --query="INSERT INTO test SELECT * FROM input('test_structure') FORMAT CSV" ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/input/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/input/) diff --git a/docs/zh/sql-reference/table-functions/jdbc.md b/docs/zh/sql-reference/table-functions/jdbc.md index 4d95a5ed203..91f494932bd 100644 --- a/docs/zh/sql-reference/table-functions/jdbc.md +++ b/docs/zh/sql-reference/table-functions/jdbc.md @@ -35,4 +35,4 @@ FROM jdbc('mysql-dev?datasource_column', 'show databases') a INNER JOIN jdbc('self?datasource_column', 'show databases') b ON a.Database = b.name ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/zh/sql-reference/table-functions/merge.md b/docs/zh/sql-reference/table-functions/merge.md index 410468b3d8a..e994c77f1b0 100644 --- a/docs/zh/sql-reference/table-functions/merge.md +++ b/docs/zh/sql-reference/table-functions/merge.md @@ -9,4 +9,4 @@ toc_title: merge 表结构取自遇到的第一个与正则表达式匹配的表。 -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/merge/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/merge/) diff --git a/docs/zh/sql-reference/table-functions/mysql.md b/docs/zh/sql-reference/table-functions/mysql.md index 3ed0001b0a0..f406a6d051e 100644 --- a/docs/zh/sql-reference/table-functions/mysql.md +++ b/docs/zh/sql-reference/table-functions/mysql.md @@ -106,4 +106,4 @@ SELECT * FROM mysql('localhost:3306', 'test', 'test', 'bayonet', '123'); - [该 ‘MySQL’ 表引擎](../../engines/table-engines/integrations/mysql.md) - [使用MySQL作为外部字典的来源](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-mysql) -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/mysql/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/mysql/) diff --git a/docs/zh/sql-reference/table-functions/null.md b/docs/zh/sql-reference/table-functions/null.md new file mode 120000 index 00000000000..bff05386e28 --- /dev/null +++ b/docs/zh/sql-reference/table-functions/null.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/null.md \ No newline at end of file diff --git a/docs/zh/sql-reference/table-functions/numbers.md b/docs/zh/sql-reference/table-functions/numbers.md index 59a57b157e0..279d2e730ba 100644 --- a/docs/zh/sql-reference/table-functions/numbers.md +++ b/docs/zh/sql-reference/table-functions/numbers.md @@ -25,4 +25,4 @@ SELECT * FROM system.numbers LIMIT 10; select toDate('2010-01-01') + number as d FROM numbers(365); ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/numbers/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/numbers/) diff --git a/docs/zh/sql-reference/table-functions/odbc.md b/docs/zh/sql-reference/table-functions/odbc.md index dd2826e892f..5a2cd8bb5f0 100644 --- a/docs/zh/sql-reference/table-functions/odbc.md +++ b/docs/zh/sql-reference/table-functions/odbc.md @@ -103,4 +103,4 @@ SELECT * FROM odbc('DSN=mysqlconn', 'test', 'test') - [ODBC外部字典](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-odbc) - [ODBC表引擎](../../engines/table-engines/integrations/odbc.md). -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/jdbc/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/jdbc/) diff --git a/docs/zh/sql-reference/table-functions/postgresql.md b/docs/zh/sql-reference/table-functions/postgresql.md index df29c2c2891..ec31432b96a 100644 --- a/docs/zh/sql-reference/table-functions/postgresql.md +++ b/docs/zh/sql-reference/table-functions/postgresql.md @@ -117,4 +117,4 @@ CREATE TABLE pg_table_schema_with_dots (a UInt32) - [PostgreSQL 表引擎](../../engines/table-engines/integrations/postgresql.md) - [使用 PostgreSQL 作为外部字典的来源](../../sql-reference/dictionaries/external-dictionaries/external-dicts-dict-sources.md#dicts-external_dicts_dict_sources-postgresql) -[原始文章](https://clickhouse.tech/docs/en/sql-reference/table-functions/postgresql/) +[原始文章](https://clickhouse.com/docs/en/sql-reference/table-functions/postgresql/) diff --git a/docs/zh/sql-reference/table-functions/remote.md b/docs/zh/sql-reference/table-functions/remote.md index dfe81d0bafe..236ce1a7499 100644 --- a/docs/zh/sql-reference/table-functions/remote.md +++ b/docs/zh/sql-reference/table-functions/remote.md @@ -101,4 +101,4 @@ INSERT INTO FUNCTION remote('127.0.0.1', currentDatabase(), 'remote_table') VALU SELECT * FROM remote_table; ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/remote/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/remote/) diff --git a/docs/zh/sql-reference/table-functions/s3.md b/docs/zh/sql-reference/table-functions/s3.md index c55412f4ddd..06a6719b445 100644 --- a/docs/zh/sql-reference/table-functions/s3.md +++ b/docs/zh/sql-reference/table-functions/s3.md @@ -129,4 +129,4 @@ SELECT name, value FROM existing_table; - [S3 引擎](../../engines/table-engines/integrations/s3.md) -[原始文章](https://clickhouse.tech/docs/en/sql-reference/table-functions/s3/) +[原始文章](https://clickhouse.com/docs/en/sql-reference/table-functions/s3/) diff --git a/docs/zh/sql-reference/table-functions/s3Cluster.md b/docs/zh/sql-reference/table-functions/s3Cluster.md new file mode 120000 index 00000000000..48e5367084e --- /dev/null +++ b/docs/zh/sql-reference/table-functions/s3Cluster.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/s3Cluster.md \ No newline at end of file diff --git a/docs/zh/sql-reference/table-functions/sqlite.md b/docs/zh/sql-reference/table-functions/sqlite.md new file mode 120000 index 00000000000..7f203c4d062 --- /dev/null +++ b/docs/zh/sql-reference/table-functions/sqlite.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/sqlite.md \ No newline at end of file diff --git a/docs/zh/sql-reference/table-functions/url.md b/docs/zh/sql-reference/table-functions/url.md index d726cddd748..fe3e3ac25e9 100644 --- a/docs/zh/sql-reference/table-functions/url.md +++ b/docs/zh/sql-reference/table-functions/url.md @@ -40,4 +40,4 @@ CREATE TABLE test_table (column1 String, column2 UInt32) ENGINE=Memory; INSERT INTO FUNCTION url('http://127.0.0.1:8123/?query=INSERT+INTO+test_table+FORMAT+CSV', 'CSV', 'column1 String, column2 UInt32') VALUES ('http interface', 42); SELECT * FROM test_table; ``` -[原始文章](https://clickhouse.tech/docs/en/query_language/table_functions/url/) +[原始文章](https://clickhouse.com/docs/en/query_language/table_functions/url/) diff --git a/docs/zh/sql-reference/table-functions/view.md b/docs/zh/sql-reference/table-functions/view.md new file mode 120000 index 00000000000..19a5bf245cd --- /dev/null +++ b/docs/zh/sql-reference/table-functions/view.md @@ -0,0 +1 @@ +../../../en/sql-reference/table-functions/view.md \ No newline at end of file diff --git a/docs/zh/sql-reference/window-functions/index.md b/docs/zh/sql-reference/window-functions/index.md new file mode 120000 index 00000000000..206505bf0eb --- /dev/null +++ b/docs/zh/sql-reference/window-functions/index.md @@ -0,0 +1 @@ +../../../en/sql-reference/window-functions/index.md \ No newline at end of file diff --git a/docs/zh/whats-new/changelog/2020.md b/docs/zh/whats-new/changelog/2020.md new file mode 120000 index 00000000000..f0fb97311d2 --- /dev/null +++ b/docs/zh/whats-new/changelog/2020.md @@ -0,0 +1 @@ +../../../en/whats-new/changelog/2020.md \ No newline at end of file diff --git a/docs/zh/whats-new/roadmap.md b/docs/zh/whats-new/roadmap.md index df4b027f7da..3cb9dd6fa2f 100644 --- a/docs/zh/whats-new/roadmap.md +++ b/docs/zh/whats-new/roadmap.md @@ -7,4 +7,4 @@ toc_title: Roadmap `2021年Roadmap`已公布供公开讨论查看[这里](https://github.com/ClickHouse/ClickHouse/issues/17623). -{## [源文章](https://clickhouse.tech/docs/en/roadmap/) ##} +{## [源文章](https://clickhouse.com/docs/en/roadmap/) ##} diff --git a/docs/zh/whats-new/security-changelog.md b/docs/zh/whats-new/security-changelog.md index 9cf0ca0b08c..24f352c6028 100644 --- a/docs/zh/whats-new/security-changelog.md +++ b/docs/zh/whats-new/security-changelog.md @@ -71,4 +71,4 @@ deb包中的错误配置可能导致未经授权使用数据库。 作者:英国国家网络安全中心(NCSC) -{## [Original article](https://clickhouse.tech/docs/en/security_changelog/) ##} +{## [Original article](https://clickhouse.com/docs/en/security_changelog/) ##} diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 6929bd861ed..43d9f974648 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -11,28 +11,28 @@ option (ENABLE_CLICKHOUSE_SERVER "Server mode (main mode)" ${ENABLE_CLICKHOUSE_A option (ENABLE_CLICKHOUSE_CLIENT "Client mode (interactive tui/shell that connects to the server)" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/clickhouse-local/ +# https://clickhouse.com/docs/en/operations/utilities/clickhouse-local/ option (ENABLE_CLICKHOUSE_LOCAL "Local files fast processing mode" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/clickhouse-benchmark/ +# https://clickhouse.com/docs/en/operations/utilities/clickhouse-benchmark/ option (ENABLE_CLICKHOUSE_BENCHMARK "Queries benchmarking mode" ${ENABLE_CLICKHOUSE_ALL}) option (ENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG "Configs processor (extract values etc.)" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/clickhouse-compressor/ +# https://clickhouse.com/docs/en/operations/utilities/clickhouse-compressor/ option (ENABLE_CLICKHOUSE_COMPRESSOR "Data compressor and decompressor" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/clickhouse-copier/ +# https://clickhouse.com/docs/en/operations/utilities/clickhouse-copier/ option (ENABLE_CLICKHOUSE_COPIER "Inter-cluster data copying mode" ${ENABLE_CLICKHOUSE_ALL}) option (ENABLE_CLICKHOUSE_FORMAT "Queries pretty-printer and formatter with syntax highlighting" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/clickhouse-obfuscator/ +# https://clickhouse.com/docs/en/operations/utilities/clickhouse-obfuscator/ option (ENABLE_CLICKHOUSE_OBFUSCATOR "Table data obfuscator (convert real data to benchmark-ready one)" ${ENABLE_CLICKHOUSE_ALL}) -# https://clickhouse.tech/docs/en/operations/utilities/odbc-bridge/ +# https://clickhouse.com/docs/en/operations/utilities/odbc-bridge/ # TODO Also needs NANODBC. if (ENABLE_ODBC) option (ENABLE_CLICKHOUSE_ODBC_BRIDGE "HTTP-server working like a proxy to ODBC driver" @@ -44,10 +44,10 @@ endif () option (ENABLE_CLICKHOUSE_LIBRARY_BRIDGE "HTTP-server working like a proxy to Library dictionary source" ${ENABLE_CLICKHOUSE_ALL}) -# https://presentations.clickhouse.tech/matemarketing_2020/ -option (ENABLE_CLICKHOUSE_GIT_IMPORT "A tool to analyze Git repositories" - ${ENABLE_CLICKHOUSE_ALL}) +# https://presentations.clickhouse.com/matemarketing_2020/ +option (ENABLE_CLICKHOUSE_GIT_IMPORT "A tool to analyze Git repositories" ${ENABLE_CLICKHOUSE_ALL}) +option (ENABLE_CLICKHOUSE_STATIC_FILES_DISK_UPLOADER "A tool to export table data files to be later put to a static files web server" ${ENABLE_CLICKHOUSE_ALL}) option (ENABLE_CLICKHOUSE_KEEPER "ClickHouse alternative to ZooKeeper" ${ENABLE_CLICKHOUSE_ALL}) @@ -227,6 +227,7 @@ add_subdirectory (obfuscator) add_subdirectory (install) add_subdirectory (git-import) add_subdirectory (bash-completion) +add_subdirectory (static-files-disk-uploader) if (ENABLE_CLICKHOUSE_KEEPER) add_subdirectory (keeper) @@ -258,7 +259,8 @@ if (CLICKHOUSE_ONE_SHARED) ${CLICKHOUSE_GIT_IMPORT_SOURCES} ${CLICKHOUSE_ODBC_BRIDGE_SOURCES} ${CLICKHOUSE_KEEPER_SOURCES} - ${CLICKHOUSE_KEEPER_CONVERTER_SOURCES}) + ${CLICKHOUSE_KEEPER_CONVERTER_SOURCES} + ${CLICKHOUSE_STATIC_FILES_DISK_UPLOADER_SOURCES}) target_link_libraries(clickhouse-lib ${CLICKHOUSE_SERVER_LINK} @@ -273,7 +275,8 @@ if (CLICKHOUSE_ONE_SHARED) ${CLICKHOUSE_GIT_IMPORT_LINK} ${CLICKHOUSE_ODBC_BRIDGE_LINK} ${CLICKHOUSE_KEEPER_LINK} - ${CLICKHOUSE_KEEPER_CONVERTER_LINK}) + ${CLICKHOUSE_KEEPER_CONVERTER_LINK} + ${CLICKHOUSE_STATIC_FILES_DISK_UPLOADER_LINK}) target_include_directories(clickhouse-lib ${CLICKHOUSE_SERVER_INCLUDE} @@ -306,6 +309,7 @@ if (CLICKHOUSE_SPLIT_BINARY) clickhouse-obfuscator clickhouse-git-import clickhouse-copier + clickhouse-static-files-disk-uploader ) if (ENABLE_CLICKHOUSE_ODBC_BRIDGE) @@ -371,6 +375,9 @@ else () if (ENABLE_CLICKHOUSE_GIT_IMPORT) clickhouse_target_link_split_lib(clickhouse git-import) endif () + if (ENABLE_CLICKHOUSE_STATIC_FILES_DISK_UPLOADER) + clickhouse_target_link_split_lib(clickhouse static-files-disk-uploader) + endif () if (ENABLE_CLICKHOUSE_KEEPER) clickhouse_target_link_split_lib(clickhouse keeper) endif() @@ -432,6 +439,11 @@ else () install (FILES "${CMAKE_CURRENT_BINARY_DIR}/clickhouse-git-import" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) list(APPEND CLICKHOUSE_BUNDLE clickhouse-git-import) endif () + if (ENABLE_CLICKHOUSE_STATIC_FILES_DISK_UPLOADER) + add_custom_target (clickhouse-static-files-disk-uploader ALL COMMAND ${CMAKE_COMMAND} -E create_symlink clickhouse clickhouse-static-files-disk-uploader DEPENDS clickhouse) + install (FILES "${CMAKE_CURRENT_BINARY_DIR}/clickhouse-static-files-disk-uploader" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) + list(APPEND CLICKHOUSE_BUNDLE clickhouse-static-files-disk-uploader) + endif () if (ENABLE_CLICKHOUSE_KEEPER) add_custom_target (clickhouse-keeper ALL COMMAND ${CMAKE_COMMAND} -E create_symlink clickhouse clickhouse-keeper DEPENDS clickhouse) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/clickhouse-keeper" DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse) diff --git a/programs/client/CMakeLists.txt b/programs/client/CMakeLists.txt index 1de5ea88aee..97616e9b69f 100644 --- a/programs/client/CMakeLists.txt +++ b/programs/client/CMakeLists.txt @@ -1,9 +1,6 @@ set (CLICKHOUSE_CLIENT_SOURCES Client.cpp - ConnectionParameters.cpp - QueryFuzzer.cpp - Suggest.cpp - TestHint.cpp + TestTags.cpp ) set (CLICKHOUSE_CLIENT_LINK diff --git a/programs/client/Client.cpp b/programs/client/Client.cpp index 65e245750b3..8acdeb96e80 100644 --- a/programs/client/Client.cpp +++ b/programs/client/Client.cpp @@ -1,20 +1,3 @@ -#include -#include "Common/MemoryTracker.h" -#include "Columns/ColumnsNumber.h" -#include "ConnectionParameters.h" -#include "IO/CompressionMethod.h" -#include "QueryFuzzer.h" -#include "Suggest.h" -#include "TestHint.h" - -#if USE_REPLXX -# include -#elif defined(USE_READLINE) && USE_READLINE -# include -#else -# include -#endif - #include #include #include @@ -25,80 +8,61 @@ #include #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include "Client.h" + +#include +#include + +#if !defined(ARCADIA_BUILD) +# include +#endif #include -#include -#include #include #include -#include -#include -#include -#include #include #include -#include +#include +#include +#include "Common/MemoryTracker.h" + #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include + #include #include #include #include -#include #include -#include -#include +#include + #include + #include #include #include #include #include #include -#include -#include #include #include #include -#include -#include -#include + #include -#include -#include -#include + #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(ARCADIA_BUILD) -# include -#endif +#include "TestTags.h" #ifndef __clang__ #pragma GCC optimize("-fno-var-tracking-assignments") @@ -114,25 +78,595 @@ namespace CurrentMetrics namespace fs = std::filesystem; + namespace DB { namespace ErrorCodes { - extern const int NETWORK_ERROR; - extern const int NO_DATA_TO_INSERT; extern const int BAD_ARGUMENTS; extern const int UNKNOWN_PACKET_FROM_SERVER; - extern const int UNEXPECTED_PACKET_FROM_SERVER; - extern const int CLIENT_OUTPUT_FORMAT_SPECIFIED; - extern const int INVALID_USAGE_OF_INPUT; - extern const int DEADLOCK_AVOIDED; - extern const int UNRECOGNIZED_ARGUMENTS; extern const int SYNTAX_ERROR; extern const int TOO_DEEP_RECURSION; + extern const int NETWORK_ERROR; + extern const int UNRECOGNIZED_ARGUMENTS; extern const int AUTHENTICATION_FAILED; } +void Client::processError(const String & query) const +{ + if (server_exception) + { + bool print_stack_trace = config().getBool("stacktrace", false); + fmt::print(stderr, "Received exception from server (version {}):\n{}\n", + server_version, + getExceptionMessage(*server_exception, print_stack_trace, true)); + if (is_interactive) + { + fmt::print(stderr, "\n"); + } + else + { + fmt::print(stderr, "(query: {})\n", query); + } + } + + if (client_exception) + { + fmt::print(stderr, "Error on processing query: {}\n", client_exception->message()); + + if (is_interactive) + { + fmt::print(stderr, "\n"); + } + else + { + fmt::print(stderr, "(query: {})\n", query); + } + } + + // A debug check -- at least some exception must be set, if the error + // flag is set, and vice versa. + assert(have_error == (client_exception || server_exception)); +} + + +bool Client::executeMultiQuery(const String & all_queries_text) +{ + // It makes sense not to base any control flow on this, so that it is + // the same in tests and in normal usage. The only difference is that in + // normal mode we ignore the test hints. + const bool test_mode = config().has("testmode"); + if (test_mode) + { + /// disable logs if expects errors + TestHint test_hint(test_mode, all_queries_text); + if (test_hint.clientError() || test_hint.serverError()) + processTextAsSingleQuery("SET send_logs_level = 'fatal'"); + } + + bool echo_query = echo_queries; + + /// Test tags are started with "--" so they are interpreted as comments anyway. + /// But if the echo is enabled we have to remove the test tags from `all_queries_text` + /// because we don't want test tags to be echoed. + size_t test_tags_length = test_mode ? getTestTagsLength(all_queries_text) : 0; + + /// Several queries separated by ';'. + /// INSERT data is ended by the end of line, not ';'. + /// An exception is VALUES format where we also support semicolon in + /// addition to end of line. + const char * this_query_begin = all_queries_text.data() + test_tags_length; + const char * this_query_end; + const char * all_queries_end = all_queries_text.data() + all_queries_text.size(); + + String full_query; // full_query is the query + inline INSERT data + trailing comments (the latter is our best guess for now). + String query_to_execute; + ASTPtr parsed_query; + std::optional current_exception; + + while (true) + { + auto stage = analyzeMultiQueryText(this_query_begin, this_query_end, all_queries_end, + query_to_execute, parsed_query, all_queries_text, current_exception); + switch (stage) + { + case MultiQueryProcessingStage::QUERIES_END: + case MultiQueryProcessingStage::PARSING_FAILED: + { + return true; + } + case MultiQueryProcessingStage::CONTINUE_PARSING: + { + continue; + } + case MultiQueryProcessingStage::PARSING_EXCEPTION: + { + this_query_end = find_first_symbols<'\n'>(this_query_end, all_queries_end); + + // Try to find test hint for syntax error. We don't know where + // the query ends because we failed to parse it, so we consume + // the entire line. + TestHint hint(test_mode, String(this_query_begin, this_query_end - this_query_begin)); + if (hint.serverError()) + { + // Syntax errors are considered as client errors + current_exception->addMessage("\nExpected server error '{}'.", hint.serverError()); + current_exception->rethrow(); + } + + if (hint.clientError() != current_exception->code()) + { + if (hint.clientError()) + current_exception->addMessage("\nExpected client error: " + std::to_string(hint.clientError())); + current_exception->rethrow(); + } + + /// It's expected syntax error, skip the line + this_query_begin = this_query_end; + current_exception.reset(); + + continue; + } + case MultiQueryProcessingStage::EXECUTE_QUERY: + { + full_query = all_queries_text.substr(this_query_begin - all_queries_text.data(), this_query_end - this_query_begin); + if (query_fuzzer_runs) + { + if (!processWithFuzzing(full_query)) + return false; + this_query_begin = this_query_end; + continue; + } + + // Now we know for sure where the query ends. + // Look for the hint in the text of query + insert data + trailing + // comments, + // e.g. insert into t format CSV 'a' -- { serverError 123 }. + // Use the updated query boundaries we just calculated. + TestHint test_hint(test_mode, full_query); + // Echo all queries if asked; makes for a more readable reference + // file. + echo_query = test_hint.echoQueries().value_or(echo_query); + try + { + processParsedSingleQuery(full_query, query_to_execute, parsed_query, echo_query, false); + } + catch (...) + { + // Surprisingly, this is a client error. A server error would + // have been reported w/o throwing (see onReceiveSeverException()). + client_exception = std::make_unique(getCurrentExceptionMessage(true), getCurrentExceptionCode()); + have_error = true; + } + // Check whether the error (or its absence) matches the test hints + // (or their absence). + bool error_matches_hint = true; + if (have_error) + { + if (test_hint.serverError()) + { + if (!server_exception) + { + error_matches_hint = false; + fmt::print(stderr, "Expected server error code '{}' but got no server error (query: {}).\n", + test_hint.serverError(), full_query); + } + else if (server_exception->code() != test_hint.serverError()) + { + error_matches_hint = false; + fmt::print(stderr, "Expected server error code: {} but got: {} (query: {}).\n", + test_hint.serverError(), server_exception->code(), full_query); + } + } + if (test_hint.clientError()) + { + if (!client_exception) + { + error_matches_hint = false; + fmt::print(stderr, "Expected client error code '{}' but got no client error (query: {}).\n", + test_hint.clientError(), full_query); + } + else if (client_exception->code() != test_hint.clientError()) + { + error_matches_hint = false; + fmt::print(stderr, "Expected client error code '{}' but got '{}' (query: {}).\n", + test_hint.clientError(), client_exception->code(), full_query); + } + } + if (!test_hint.clientError() && !test_hint.serverError()) + { + // No error was expected but it still occurred. This is the + // default case w/o test hint, doesn't need additional + // diagnostics. + error_matches_hint = false; + } + } + else + { + if (test_hint.clientError()) + { + fmt::print(stderr, "The query succeeded but the client error '{}' was expected (query: {}).\n", + test_hint.clientError(), full_query); + error_matches_hint = false; + } + if (test_hint.serverError()) + { + fmt::print(stderr, "The query succeeded but the server error '{}' was expected (query: {}).\n", + test_hint.serverError(), full_query); + error_matches_hint = false; + } + } + // If the error is expected, force reconnect and ignore it. + if (have_error && error_matches_hint) + { + client_exception.reset(); + server_exception.reset(); + have_error = false; + + if (!connection->checkConnected()) + connect(); + } + + // For INSERTs with inline data: use the end of inline data as + // reported by the format parser (it is saved in sendData()). + // This allows us to handle queries like: + // insert into t values (1); select 1 + // , where the inline data is delimited by semicolon and not by a + // newline. + auto * insert_ast = parsed_query->as(); + if (insert_ast && insert_ast->data) + { + this_query_end = insert_ast->end; + adjustQueryEnd(this_query_end, all_queries_end, global_context->getSettingsRef().max_parser_depth); + } + + // Report error. + if (have_error) + processError(full_query); + + // Stop processing queries if needed. + if (have_error && !ignore_error) + return is_interactive; + + this_query_begin = this_query_end; + break; + } + } + } +} + + +/// Make query to get all server warnings +std::vector Client::loadWarningMessages() +{ + std::vector messages; + connection->sendQuery(connection_parameters.timeouts, "SELECT message FROM system.warnings", "" /* query_id */, + QueryProcessingStage::Complete, nullptr, nullptr, false); + while (true) + { + Packet packet = connection->receivePacket(); + switch (packet.type) + { + case Protocol::Server::Data: + if (packet.block) + { + const ColumnString & column = typeid_cast(*packet.block.getByPosition(0).column); + + size_t rows = packet.block.rows(); + for (size_t i = 0; i < rows; ++i) + messages.emplace_back(column.getDataAt(i).toString()); + } + continue; + + case Protocol::Server::Progress: + continue; + case Protocol::Server::ProfileInfo: + continue; + case Protocol::Server::Totals: + continue; + case Protocol::Server::Extremes: + continue; + case Protocol::Server::Log: + continue; + + case Protocol::Server::Exception: + packet.exception->rethrow(); + return messages; + + case Protocol::Server::EndOfStream: + return messages; + + default: + throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from server {}", + packet.type, connection->getDescription()); + } + } +} + + +void Client::initialize(Poco::Util::Application & self) +{ + Poco::Util::Application::initialize(self); + + const char * home_path_cstr = getenv("HOME"); + if (home_path_cstr) + home_path = home_path_cstr; + + configReadClient(config(), home_path); + + // global_context->setApplicationType(Context::ApplicationType::CLIENT); + global_context->setQueryParameters(query_parameters); + + /// settings and limits could be specified in config file, but passed settings has higher priority + for (const auto & setting : global_context->getSettingsRef().allUnchanged()) + { + const auto & name = setting.getName(); + if (config().has(name)) + global_context->setSetting(name, config().getString(name)); + } + + /// Set path for format schema files + if (config().has("format_schema_path")) + global_context->setFormatSchemaPath(fs::weakly_canonical(config().getString("format_schema_path"))); +} + + +int Client::main(const std::vector & /*args*/) +try +{ + UseSSL use_ssl; + MainThreadStatus::getInstance(); + + std::cout << std::fixed << std::setprecision(3); + std::cerr << std::fixed << std::setprecision(3); + + /// Limit on total memory usage + size_t max_client_memory_usage = config().getInt64("max_memory_usage_in_client", 0 /*default value*/); + + if (max_client_memory_usage != 0) + { + total_memory_tracker.setHardLimit(max_client_memory_usage); + total_memory_tracker.setDescription("(total)"); + total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking); + } + + registerFormats(); + registerFunctions(); + registerAggregateFunctions(); + + processConfig(); + + if (is_interactive) + { + clearTerminal(); + showClientVersion(); + } + + connect(); + + if (is_interactive) + { + /// Load Warnings at the beginning of connection + if (!config().has("no-warnings")) + { + try + { + std::vector messages = loadWarningMessages(); + if (!messages.empty()) + { + std::cout << "Warnings:" << std::endl; + for (const auto & message : messages) + std::cout << " * " << message << std::endl; + std::cout << std::endl; + } + } + catch (...) + { + /// Ignore exception + } + } + + runInteractive(); + } + else + { + connection->setDefaultDatabase(connection_parameters.default_database); + + runNonInteractive(); + + // If exception code isn't zero, we should return non-zero return + // code anyway. + const auto * exception = server_exception ? server_exception.get() : client_exception.get(); + + if (exception) + { + return exception->code() != 0 ? exception->code() : -1; + } + + if (have_error) + { + // Shouldn't be set without an exception, but check it just in + // case so that at least we don't lose an error. + return -1; + } + } + + return 0; +} +catch (const Exception & e) +{ + bool print_stack_trace = config().getBool("stacktrace", false) && e.code() != ErrorCodes::NETWORK_ERROR; + std::cerr << getExceptionMessage(e, print_stack_trace, true) << std::endl << std::endl; + /// If exception code isn't zero, we should return non-zero return code anyway. + return e.code() ? e.code() : -1; +} +catch (...) +{ + std::cerr << getCurrentExceptionMessage(false) << std::endl; + return getCurrentExceptionCode(); +} + + +void Client::connect() +{ + connection_parameters = ConnectionParameters(config()); + + if (is_interactive) + std::cout << "Connecting to " + << (!connection_parameters.default_database.empty() ? "database " + connection_parameters.default_database + " at " + : "") + << connection_parameters.host << ":" << connection_parameters.port + << (!connection_parameters.user.empty() ? " as user " + connection_parameters.user : "") << "." << std::endl; + + String server_name; + UInt64 server_version_major = 0; + UInt64 server_version_minor = 0; + UInt64 server_version_patch = 0; + + try + { + connection = Connection::createConnection(connection_parameters, global_context); + + if (max_client_network_bandwidth) + { + ThrottlerPtr throttler = std::make_shared(max_client_network_bandwidth, 0, ""); + connection->setThrottler(throttler); + } + + connection->getServerVersion( + connection_parameters.timeouts, server_name, server_version_major, server_version_minor, server_version_patch, server_revision); + } + catch (const Exception & e) + { + /// It is typical when users install ClickHouse, type some password and instantly forget it. + if ((connection_parameters.user.empty() || connection_parameters.user == "default") + && e.code() == DB::ErrorCodes::AUTHENTICATION_FAILED) + { + std::cerr << std::endl + << "If you have installed ClickHouse and forgot password you can reset it in the configuration file." << std::endl + << "The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml" << std::endl + << "and deleting this file will reset the password." << std::endl + << "See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed." << std::endl + << std::endl; + } + + throw; + } + + server_version = toString(server_version_major) + "." + toString(server_version_minor) + "." + toString(server_version_patch); + load_suggestions = is_interactive && (server_revision >= Suggest::MIN_SERVER_REVISION && !config().getBool("disable_suggestion", false)); + + if (server_display_name = connection->getServerDisplayName(connection_parameters.timeouts); server_display_name.empty()) + server_display_name = config().getString("host", "localhost"); + + if (is_interactive) + { + std::cout << "Connected to " << server_name << " server version " << server_version << " revision " << server_revision << "." + << std::endl + << std::endl; + + auto client_version_tuple = std::make_tuple(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); + auto server_version_tuple = std::make_tuple(server_version_major, server_version_minor, server_version_patch); + + if (client_version_tuple < server_version_tuple) + { + std::cout << "ClickHouse client version is older than ClickHouse server. " + << "It may lack support for new features." << std::endl + << std::endl; + } + else if (client_version_tuple > server_version_tuple) + { + std::cout << "ClickHouse server version is older than ClickHouse client. " + << "It may indicate that the server is out of date and can be upgraded." << std::endl + << std::endl; + } + } + + if (!global_context->getSettingsRef().use_client_time_zone) + { + const auto & time_zone = connection->getServerTimezone(connection_parameters.timeouts); + if (!time_zone.empty()) + { + try + { + DateLUT::setDefaultTimezone(time_zone); + } + catch (...) + { + std::cerr << "Warning: could not switch to server time zone: " << time_zone + << ", reason: " << getCurrentExceptionMessage(/* with_stacktrace = */ false) << std::endl + << "Proceeding with local time zone." << std::endl + << std::endl; + } + } + else + { + std::cerr << "Warning: could not determine server time zone. " + << "Proceeding with local time zone." << std::endl + << std::endl; + } + } + + prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name.default", "{display_name} :) "); + + Strings keys; + config().keys("prompt_by_server_display_name", keys); + for (const String & key : keys) + { + if (key != "default" && server_display_name.find(key) != std::string::npos) + { + prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name." + key); + break; + } + } + + /// Prompt may contain escape sequences including \e[ or \x1b[ sequences to set terminal color. + { + String unescaped_prompt_by_server_display_name; + ReadBufferFromString in(prompt_by_server_display_name); + readEscapedString(unescaped_prompt_by_server_display_name, in); + prompt_by_server_display_name = std::move(unescaped_prompt_by_server_display_name); + } + + /// Prompt may contain the following substitutions in a form of {name}. + std::map prompt_substitutions{ + {"host", connection_parameters.host}, + {"port", toString(connection_parameters.port)}, + {"user", connection_parameters.user}, + {"display_name", server_display_name}, + }; + + /// Quite suboptimal. + for (const auto & [key, value] : prompt_substitutions) + boost::replace_all(prompt_by_server_display_name, "{" + key + "}", value); +} + + +// Prints changed settings to stderr. Useful for debugging fuzzing failures. +void Client::printChangedSettings() const +{ + const auto & changes = global_context->getSettingsRef().changes(); + if (!changes.empty()) + { + fmt::print(stderr, "Changed settings: "); + for (size_t i = 0; i < changes.size(); ++i) + { + if (i) + { + fmt::print(stderr, ", "); + } + fmt::print(stderr, "{} = '{}'", changes[i].name, toString(changes[i].value)); + } + fmt::print(stderr, "\n"); + } + else + { + fmt::print(stderr, "No changed settings.\n"); + } +} + + static bool queryHasWithClause(const IAST * ast) { if (const auto * select = dynamic_cast(ast); select && select->with()) @@ -160,2683 +694,536 @@ static bool queryHasWithClause(const IAST * ast) } -class Client : public Poco::Util::Application +/// Returns false when server is not available. +bool Client::processWithFuzzing(const String & full_query) { -public: - Client() = default; + ASTPtr orig_ast; -private: - using StringSet = std::unordered_set; - StringSet exit_strings{"exit", "quit", "logout", "учше", "йгше", "дщпщге", "exit;", "quit;", "logout;", "учшеж", - "йгшеж", "дщпщгеж", "q", "й", "\\q", "\\Q", "\\й", "\\Й", ":q", "Жй"}; - bool is_interactive = true; /// Use either interactive line editing interface or batch mode. - bool echo_queries = false; /// Print queries before execution in batch mode. - bool ignore_error - = false; /// In case of errors, don't print error message, continue to next query. Only applicable for non-interactive mode. - bool print_time_to_stderr = false; /// Output execution time to stderr in batch mode. - bool stdin_is_a_tty = false; /// stdin is a terminal. - bool stdout_is_a_tty = false; /// stdout is a terminal. - - /// If not empty, queries will be read from these files - std::vector queries_files; - /// If not empty, run queries from these files before processing every file from 'queries_files'. - std::vector interleave_queries_files; - - std::unique_ptr connection; /// Connection to DB. - String full_query; /// Current query as it was given to the client. - - // Current query as it will be sent to the server. It may differ from the - // full query for INSERT queries, for which the data that follows the query - // is stripped and sent separately. - String query_to_send; - - String format; /// Query results output format. - bool is_default_format = true; /// false, if format is set in the config or command line. - size_t format_max_block_size = 0; /// Max block size for console output. - String insert_format; /// Format of INSERT data that is read from stdin in batch mode. - size_t insert_format_max_block_size = 0; /// Max block size when reading INSERT data. - size_t max_client_network_bandwidth = 0; /// The maximum speed of data exchange over the network for the client in bytes per second. - - bool has_vertical_output_suffix = false; /// Is \G present at the end of the query string? - - SharedContextHolder shared_context = Context::createShared(); - ContextMutablePtr context = Context::createGlobal(shared_context.get()); - - /// Buffer that reads from stdin in batch mode. - ReadBufferFromFileDescriptor std_in{STDIN_FILENO}; - - /// Console output. - WriteBufferFromFileDescriptor std_out{STDOUT_FILENO}; - std::unique_ptr pager_cmd; - - /// The user can specify to redirect query output to a file. - std::unique_ptr out_file_buf; - BlockOutputStreamPtr block_out_stream; - - /// The user could specify special file for server logs (stderr by default) - std::unique_ptr out_logs_buf; - String server_logs_file; - BlockOutputStreamPtr logs_out_stream; - - String home_path; - - String current_profile; - - String prompt_by_server_display_name; - - /// Path to a file containing command history. - String history_file; - - /// How many rows have been read or written. - size_t processed_rows = 0; - - /// Parsed query. Is used to determine some settings (e.g. format, output file). - ASTPtr parsed_query; - - /// The last exception that was received from the server. Is used for the - /// return code in batch mode. - std::unique_ptr server_exception; - /// Likewise, the last exception that occurred on the client. - std::unique_ptr client_exception; - - /// If the last query resulted in exception. `server_exception` or - /// `client_exception` must be set. - bool have_error = false; - - UInt64 server_revision = 0; - String server_version; - String server_display_name; - - /// true by default - for interactive mode, might be changed when --progress option is checked for - /// non-interactive mode. - bool need_render_progress = true; - - bool written_first_block = false; - - ProgressIndication progress_indication; - - /// External tables info. - std::list external_tables; - - /// Dictionary with query parameters for prepared statements. - NameToNameMap query_parameters; - - ConnectionParameters connection_parameters; - - QueryFuzzer fuzzer; - int query_fuzzer_runs = 0; - - std::optional suggest; - - /// We will format query_id in interactive mode in various ways, the default is just to print Query id: ... - std::vector> query_id_formats; - QueryProcessingStage::Enum query_processing_stage; - - void initialize(Poco::Util::Application & self) override + try { - Poco::Util::Application::initialize(self); - - const char * home_path_cstr = getenv("HOME"); - if (home_path_cstr) - home_path = home_path_cstr; - - configReadClient(config(), home_path); - - context->setApplicationType(Context::ApplicationType::CLIENT); - context->setQueryParameters(query_parameters); - - /// settings and limits could be specified in config file, but passed settings has higher priority - for (const auto & setting : context->getSettingsRef().allUnchanged()) - { - const auto & name = setting.getName(); - if (config().has(name)) - context->setSetting(name, config().getString(name)); - } - - /// Set path for format schema files - if (config().has("format_schema_path")) - context->setFormatSchemaPath(fs::weakly_canonical(config().getString("format_schema_path"))); - - /// Initialize query_id_formats if any - if (config().has("query_id_formats")) - { - Poco::Util::AbstractConfiguration::Keys keys; - config().keys("query_id_formats", keys); - for (const auto & name : keys) - query_id_formats.emplace_back(name + ":", config().getString("query_id_formats." + name)); - } - if (query_id_formats.empty()) - query_id_formats.emplace_back("Query id:", " {query_id}\n"); + const char * begin = full_query.data(); + orig_ast = parseQuery(begin, begin + full_query.size(), true); + } + catch (const Exception & e) + { + if (e.code() != ErrorCodes::SYNTAX_ERROR && + e.code() != ErrorCodes::TOO_DEEP_RECURSION) + throw; } - - int main(const std::vector & /*args*/) override + // `USE db` should not be executed + // since this will break every query after `DROP db` + if (orig_ast->as()) { + return true; + } + + if (!orig_ast) + { + // Can't continue after a parsing error + return true; + } + + // Don't repeat: + // - INSERT -- Because the tables may grow too big. + // - CREATE -- Because first we run the unmodified query, it will succeed, + // and the subsequent queries will fail. + // When we run out of fuzzer errors, it may be interesting to + // add fuzzing of create queries that wraps columns into + // LowCardinality or Nullable. + // Also there are other kinds of create queries such as CREATE + // DICTIONARY, we could fuzz them as well. + // - DROP -- No point in this (by the same reasons). + // - SET -- The time to fuzz the settings has not yet come + // (see comments in Client/QueryFuzzer.cpp) + size_t this_query_runs = query_fuzzer_runs; + if (orig_ast->as() || + orig_ast->as() || + orig_ast->as() || + orig_ast->as()) + { + this_query_runs = 1; + } + + String query_to_execute; + ASTPtr parsed_query; + + ASTPtr fuzz_base = orig_ast; + for (size_t fuzz_step = 0; fuzz_step < this_query_runs; ++fuzz_step) + { + fmt::print(stderr, "Fuzzing step {} out of {}\n", fuzz_step, this_query_runs); + + ASTPtr ast_to_process; try { - return mainImpl(); - } - catch (const Exception & e) - { - bool print_stack_trace = config().getBool("stacktrace", false) && e.code() != ErrorCodes::NETWORK_ERROR; + WriteBufferFromOwnString dump_before_fuzz; + fuzz_base->dumpTree(dump_before_fuzz); + auto base_before_fuzz = fuzz_base->formatForErrorMessage(); - std::cerr << getExceptionMessage(e, print_stack_trace, true) << std::endl << std::endl; + ast_to_process = fuzz_base->clone(); - /// If exception code isn't zero, we should return non-zero return code anyway. - return e.code() ? e.code() : -1; + WriteBufferFromOwnString dump_of_cloned_ast; + ast_to_process->dumpTree(dump_of_cloned_ast); + + // Run the original query as well. + if (fuzz_step > 0) + { + fuzzer.fuzzMain(ast_to_process); + } + + auto base_after_fuzz = fuzz_base->formatForErrorMessage(); + + // Check that the source AST didn't change after fuzzing. This + // helps debug AST cloning errors, where the cloned AST doesn't + // clone all its children, and erroneously points to some source + // child elements. + if (base_before_fuzz != base_after_fuzz) + { + printChangedSettings(); + + fmt::print( + stderr, + "Base before fuzz: {}\n" + "Base after fuzz: {}\n", + base_before_fuzz, + base_after_fuzz); + fmt::print(stderr, "Dump before fuzz:\n{}\n", dump_before_fuzz.str()); + fmt::print(stderr, "Dump of cloned AST:\n{}\n", dump_of_cloned_ast.str()); + fmt::print(stderr, "Dump after fuzz:\n"); + + WriteBufferFromOStream cerr_buf(std::cerr, 4096); + fuzz_base->dumpTree(cerr_buf); + cerr_buf.next(); + + fmt::print( + stderr, + "Found error: IAST::clone() is broken for some AST node. This is a bug. The original AST ('dump before fuzz') and its cloned copy ('dump of cloned AST') refer to the same nodes, which must never happen. This means that their parent node doesn't implement clone() correctly."); + + exit(1); + } + + auto fuzzed_text = ast_to_process->formatForErrorMessage(); + if (fuzz_step > 0 && fuzzed_text == base_before_fuzz) + { + fmt::print(stderr, "Got boring AST\n"); + continue; + } + + parsed_query = ast_to_process; + query_to_execute = parsed_query->formatForErrorMessage(); + processParsedSingleQuery(full_query, query_to_execute, parsed_query); } catch (...) { - std::cerr << getCurrentExceptionMessage(false) << std::endl; - return getCurrentExceptionCode(); - } - } - - /// Should we celebrate a bit? - static bool isNewYearMode() - { - time_t current_time = time(nullptr); - - /// It's bad to be intrusive. - if (current_time % 3 != 0) - return false; - - LocalDate now(current_time); - return (now.month() == 12 && now.day() >= 20) || (now.month() == 1 && now.day() <= 5); - } - - static bool isChineseNewYearMode(const String & local_tz) - { - /// Days of Dec. 20 in Chinese calendar starting from year 2019 to year 2105 - static constexpr UInt16 chineseNewYearIndicators[] - = {18275, 18659, 19014, 19368, 19752, 20107, 20491, 20845, 21199, 21583, 21937, 22292, 22676, 23030, 23414, 23768, 24122, 24506, - 24860, 25215, 25599, 25954, 26308, 26692, 27046, 27430, 27784, 28138, 28522, 28877, 29232, 29616, 29970, 30354, 30708, 31062, - 31446, 31800, 32155, 32539, 32894, 33248, 33632, 33986, 34369, 34724, 35078, 35462, 35817, 36171, 36555, 36909, 37293, 37647, - 38002, 38386, 38740, 39095, 39479, 39833, 40187, 40571, 40925, 41309, 41664, 42018, 42402, 42757, 43111, 43495, 43849, 44233, - 44587, 44942, 45326, 45680, 46035, 46418, 46772, 47126, 47510, 47865, 48249, 48604, 48958, 49342}; - - /// All time zone names are acquired from https://www.iana.org/time-zones - static constexpr const char * chineseNewYearTimeZoneIndicators[] = { - /// Time zones celebrating Chinese new year. - "Asia/Shanghai", - "Asia/Chongqing", - "Asia/Harbin", - "Asia/Urumqi", - "Asia/Hong_Kong", - "Asia/Chungking", - "Asia/Macao", - "Asia/Macau", - "Asia/Taipei", - "Asia/Singapore", - - /// Time zones celebrating Chinese new year but with different festival names. Let's not print the message for now. - // "Asia/Brunei", - // "Asia/Ho_Chi_Minh", - // "Asia/Hovd", - // "Asia/Jakarta", - // "Asia/Jayapura", - // "Asia/Kashgar", - // "Asia/Kuala_Lumpur", - // "Asia/Kuching", - // "Asia/Makassar", - // "Asia/Pontianak", - // "Asia/Pyongyang", - // "Asia/Saigon", - // "Asia/Seoul", - // "Asia/Ujung_Pandang", - // "Asia/Ulaanbaatar", - // "Asia/Ulan_Bator", - }; - static constexpr size_t M = sizeof(chineseNewYearTimeZoneIndicators) / sizeof(chineseNewYearTimeZoneIndicators[0]); - - time_t current_time = time(nullptr); - - if (chineseNewYearTimeZoneIndicators + M - == std::find_if(chineseNewYearTimeZoneIndicators, chineseNewYearTimeZoneIndicators + M, [&local_tz](const char * tz) - { - return tz == local_tz; - })) - return false; - - /// It's bad to be intrusive. - if (current_time % 3 != 0) - return false; - - auto days = DateLUT::instance().toDayNum(current_time).toUnderType(); - for (auto d : chineseNewYearIndicators) - { - /// Let's celebrate until Lantern Festival - if (d <= days && d + 25 >= days) - return true; - else if (d > days) - return false; - } - return false; - } - -#if USE_REPLXX - static void highlight(const String & query, std::vector & colors) - { - using namespace replxx; - - static const std::unordered_map token_to_color - = {{TokenType::Whitespace, Replxx::Color::DEFAULT}, - {TokenType::Comment, Replxx::Color::GRAY}, - {TokenType::BareWord, Replxx::Color::DEFAULT}, - {TokenType::Number, Replxx::Color::GREEN}, - {TokenType::StringLiteral, Replxx::Color::CYAN}, - {TokenType::QuotedIdentifier, Replxx::Color::MAGENTA}, - {TokenType::OpeningRoundBracket, Replxx::Color::BROWN}, - {TokenType::ClosingRoundBracket, Replxx::Color::BROWN}, - {TokenType::OpeningSquareBracket, Replxx::Color::BROWN}, - {TokenType::ClosingSquareBracket, Replxx::Color::BROWN}, - {TokenType::DoubleColon, Replxx::Color::BROWN}, - {TokenType::OpeningCurlyBrace, Replxx::Color::INTENSE}, - {TokenType::ClosingCurlyBrace, Replxx::Color::INTENSE}, - - {TokenType::Comma, Replxx::Color::INTENSE}, - {TokenType::Semicolon, Replxx::Color::INTENSE}, - {TokenType::Dot, Replxx::Color::INTENSE}, - {TokenType::Asterisk, Replxx::Color::INTENSE}, - {TokenType::HereDoc, Replxx::Color::CYAN}, - {TokenType::Plus, Replxx::Color::INTENSE}, - {TokenType::Minus, Replxx::Color::INTENSE}, - {TokenType::Slash, Replxx::Color::INTENSE}, - {TokenType::Percent, Replxx::Color::INTENSE}, - {TokenType::Arrow, Replxx::Color::INTENSE}, - {TokenType::QuestionMark, Replxx::Color::INTENSE}, - {TokenType::Colon, Replxx::Color::INTENSE}, - {TokenType::Equals, Replxx::Color::INTENSE}, - {TokenType::NotEquals, Replxx::Color::INTENSE}, - {TokenType::Less, Replxx::Color::INTENSE}, - {TokenType::Greater, Replxx::Color::INTENSE}, - {TokenType::LessOrEquals, Replxx::Color::INTENSE}, - {TokenType::GreaterOrEquals, Replxx::Color::INTENSE}, - {TokenType::Concatenation, Replxx::Color::INTENSE}, - {TokenType::At, Replxx::Color::INTENSE}, - {TokenType::DoubleAt, Replxx::Color::MAGENTA}, - - {TokenType::EndOfStream, Replxx::Color::DEFAULT}, - - {TokenType::Error, Replxx::Color::RED}, - {TokenType::ErrorMultilineCommentIsNotClosed, Replxx::Color::RED}, - {TokenType::ErrorSingleQuoteIsNotClosed, Replxx::Color::RED}, - {TokenType::ErrorDoubleQuoteIsNotClosed, Replxx::Color::RED}, - {TokenType::ErrorSinglePipeMark, Replxx::Color::RED}, - {TokenType::ErrorWrongNumber, Replxx::Color::RED}, - {TokenType::ErrorMaxQuerySizeExceeded, Replxx::Color::RED }}; - - const Replxx::Color unknown_token_color = Replxx::Color::RED; - - Lexer lexer(query.data(), query.data() + query.size()); - size_t pos = 0; - - for (Token token = lexer.nextToken(); !token.isEnd(); token = lexer.nextToken()) - { - size_t utf8_len = UTF8::countCodePoints(reinterpret_cast(token.begin), token.size()); - for (size_t code_point_index = 0; code_point_index < utf8_len; ++code_point_index) - { - if (token_to_color.find(token.type) != token_to_color.end()) - colors[pos + code_point_index] = token_to_color.at(token.type); - else - colors[pos + code_point_index] = unknown_token_color; - } - - pos += utf8_len; - } - } -#endif - - /// Make query to get all server warnings - std::vector loadWarningMessages() - { - std::vector messages; - connection->sendQuery(connection_parameters.timeouts, "SELECT message FROM system.warnings", "" /* query_id */, QueryProcessingStage::Complete); - while (true) - { - Packet packet = connection->receivePacket(); - switch (packet.type) - { - case Protocol::Server::Data: - if (packet.block) - { - const ColumnString & column = typeid_cast(*packet.block.getByPosition(0).column); - - size_t rows = packet.block.rows(); - for (size_t i = 0; i < rows; ++i) - messages.emplace_back(column.getDataAt(i).toString()); - } - continue; - - case Protocol::Server::Progress: - continue; - case Protocol::Server::ProfileInfo: - continue; - case Protocol::Server::Totals: - continue; - case Protocol::Server::Extremes: - continue; - case Protocol::Server::Log: - continue; - - case Protocol::Server::Exception: - packet.exception->rethrow(); - return messages; - - case Protocol::Server::EndOfStream: - return messages; - - default: - throw Exception(ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from server {}", - packet.type, connection->getDescription()); - } - } - } - - int mainImpl() - { - UseSSL use_ssl; - - MainThreadStatus::getInstance(); - - /// Limit on total memory usage - size_t max_client_memory_usage = config().getInt64("max_memory_usage_in_client", 0 /*default value*/); - - if (max_client_memory_usage != 0) - { - total_memory_tracker.setHardLimit(max_client_memory_usage); - total_memory_tracker.setDescription("(total)"); - total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking); + // Some functions (e.g. protocol parsers) don't throw, but + // set last_exception instead, so we'll also do it here for + // uniformity. + // Surprisingly, this is a client exception, because we get the + // server exception w/o throwing (see onReceiveException()). + client_exception = std::make_unique(getCurrentExceptionMessage(true), getCurrentExceptionCode()); + have_error = true; } - registerFormats(); - registerFunctions(); - registerAggregateFunctions(); - - /// Batch mode is enabled if one of the following is true: - /// - -e (--query) command line option is present. - /// The value of the option is used as the text of query (or of multiple queries). - /// If stdin is not a terminal, INSERT data for the first query is read from it. - /// - stdin is not a terminal. In this case queries are read from it. - /// - -qf (--queries-file) command line option is present. - /// The value of the option is used as file with query (or of multiple queries) to execute. - if (!stdin_is_a_tty || config().has("query") || !queries_files.empty()) - is_interactive = false; - - if (config().has("query") && !queries_files.empty()) + const auto * exception = server_exception ? server_exception.get() : client_exception.get(); + // Sometimes you may get TOO_DEEP_RECURSION from the server, + // and TOO_DEEP_RECURSION should not fail the fuzzer check. + if (have_error && exception->code() == ErrorCodes::TOO_DEEP_RECURSION) { - throw Exception("Specify either `query` or `queries-file` option", ErrorCodes::BAD_ARGUMENTS); - } - - std::cout << std::fixed << std::setprecision(3); - std::cerr << std::fixed << std::setprecision(3); - - if (is_interactive) - { - clearTerminal(); - showClientVersion(); - } - - is_default_format = !config().has("vertical") && !config().has("format"); - if (config().has("vertical")) - format = config().getString("format", "Vertical"); - else - format = config().getString("format", is_interactive ? "PrettyCompact" : "TabSeparated"); - - format_max_block_size = config().getInt("format_max_block_size", context->getSettingsRef().max_block_size); - - insert_format = "Values"; - - /// Setting value from cmd arg overrides one from config - if (context->getSettingsRef().max_insert_block_size.changed) - insert_format_max_block_size = context->getSettingsRef().max_insert_block_size; - else - insert_format_max_block_size = config().getInt("insert_format_max_block_size", context->getSettingsRef().max_insert_block_size); - - if (!is_interactive) - { - need_render_progress = config().getBool("progress", false); - echo_queries = config().getBool("echo", false); - ignore_error = config().getBool("ignore-error", false); - } - - ClientInfo & client_info = context->getClientInfo(); - client_info.setInitialQuery(); - client_info.quota_key = config().getString("quota_key", ""); - - connect(); - - /// Initialize DateLUT here to avoid counting time spent here as query execution time. - const auto local_tz = DateLUT::instance().getTimeZone(); - - if (is_interactive) - { - if (config().has("query_id")) - throw Exception("query_id could be specified only in non-interactive mode", ErrorCodes::BAD_ARGUMENTS); - if (print_time_to_stderr) - throw Exception("time option could be specified only in non-interactive mode", ErrorCodes::BAD_ARGUMENTS); - - suggest.emplace(); - if (server_revision >= Suggest::MIN_SERVER_REVISION && !config().getBool("disable_suggestion", false)) - { - /// Load suggestion data from the server. - suggest->load(connection_parameters, config().getInt("suggestion_limit")); - } - - /// Load Warnings at the beginning of connection - if (!config().has("no-warnings")) - { - try - { - std::vector messages = loadWarningMessages(); - if (!messages.empty()) - { - std::cout << "Warnings:" << std::endl; - for (const auto & message : messages) - std::cout << "* " << message << std::endl; - std::cout << std::endl; - } - } - catch (...) - { - /// Ignore exception - } - } - - /// Load command history if present. - if (config().has("history_file")) - history_file = config().getString("history_file"); - else - { - auto * history_file_from_env = getenv("CLICKHOUSE_HISTORY_FILE"); - if (history_file_from_env) - history_file = history_file_from_env; - else if (!home_path.empty()) - history_file = home_path + "/.clickhouse-client-history"; - } - - if (!history_file.empty() && !fs::exists(history_file)) - { - /// Avoid TOCTOU issue. - try - { - FS::createFile(history_file); - } - catch (const ErrnoException & e) - { - if (e.getErrno() != EEXIST) - throw; - } - } - - LineReader::Patterns query_extenders = {"\\"}; - LineReader::Patterns query_delimiters = {";", "\\G"}; - -#if USE_REPLXX - replxx::Replxx::highlighter_callback_t highlight_callback{}; - if (config().getBool("highlight")) - highlight_callback = highlight; - - ReplxxLineReader lr(*suggest, history_file, config().has("multiline"), query_extenders, query_delimiters, highlight_callback); - -#elif defined(USE_READLINE) && USE_READLINE - ReadlineLineReader lr(*suggest, history_file, config().has("multiline"), query_extenders, query_delimiters); -#else - LineReader lr(history_file, config().has("multiline"), query_extenders, query_delimiters); -#endif - - /// Enable bracketed-paste-mode only when multiquery is enabled and multiline is - /// disabled, so that we are able to paste and execute multiline queries in a whole - /// instead of erroring out, while be less intrusive. - if (config().has("multiquery") && !config().has("multiline")) - lr.enableBracketedPaste(); - - do - { - auto input = lr.readLine(prompt(), ":-] "); - if (input.empty()) - break; - - has_vertical_output_suffix = false; - if (input.ends_with("\\G")) - { - input.resize(input.size() - 2); - has_vertical_output_suffix = true; - } - - try - { - if (!processQueryText(input)) - break; - } - catch (const Exception & e) - { - /// We don't need to handle the test hints in the interactive mode. - - bool print_stack_trace = config().getBool("stacktrace", false); - std::cerr << "Exception on client:" << std::endl << getExceptionMessage(e, print_stack_trace, true) << std::endl << std::endl; - client_exception = std::make_unique(e); - } - - if (client_exception) - { - /// client_exception may have been set above or elsewhere. - /// Client-side exception during query execution can result in the loss of - /// sync in the connection protocol. - /// So we reconnect and allow to enter the next query. - connect(); - } - } while (true); - - if (isNewYearMode()) - std::cout << "Happy new year." << std::endl; - else if (isChineseNewYearMode(local_tz)) - std::cout << "Happy Chinese new year. 春节快乐!" << std::endl; - else - std::cout << "Bye." << std::endl; - return 0; - } - else - { - auto query_id = config().getString("query_id", ""); - if (!query_id.empty()) - context->setCurrentQueryId(query_id); - - nonInteractive(); - - // If exception code isn't zero, we should return non-zero return - // code anyway. - const auto * exception = server_exception ? server_exception.get() : client_exception.get(); - if (exception) - { - return exception->code() != 0 ? exception->code() : -1; - } - if (have_error) - { - // Shouldn't be set without an exception, but check it just in - // case so that at least we don't lose an error. - return -1; - } - - return 0; - } - } - - - void connect() - { - connection_parameters = ConnectionParameters(config()); - - if (is_interactive) - std::cout << "Connecting to " - << (!connection_parameters.default_database.empty() ? "database " + connection_parameters.default_database + " at " - : "") - << connection_parameters.host << ":" << connection_parameters.port - << (!connection_parameters.user.empty() ? " as user " + connection_parameters.user : "") << "." << std::endl; - - String server_name; - UInt64 server_version_major = 0; - UInt64 server_version_minor = 0; - UInt64 server_version_patch = 0; - - try - { - connection = std::make_unique( - connection_parameters.host, - connection_parameters.port, - connection_parameters.default_database, - connection_parameters.user, - connection_parameters.password, - "", /* cluster */ - "", /* cluster_secret */ - "client", - connection_parameters.compression, - connection_parameters.security); - - if (max_client_network_bandwidth) - { - ThrottlerPtr throttler = std::make_shared(max_client_network_bandwidth, 0, ""); - connection->setThrottler(throttler); - } - - connection->getServerVersion( - connection_parameters.timeouts, server_name, server_version_major, server_version_minor, server_version_patch, server_revision); - } - catch (const Exception & e) - { - /// It is typical when users install ClickHouse, type some password and instantly forget it. - if ((connection_parameters.user.empty() || connection_parameters.user == "default") - && e.code() == DB::ErrorCodes::AUTHENTICATION_FAILED) - { - std::cerr << std::endl - << "If you have installed ClickHouse and forgot password you can reset it in the configuration file." << std::endl - << "The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml" << std::endl - << "and deleting this file will reset the password." << std::endl - << "See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed." << std::endl - << std::endl; - } - - throw; - } - - server_version = toString(server_version_major) + "." + toString(server_version_minor) + "." + toString(server_version_patch); - - if (server_display_name = connection->getServerDisplayName(connection_parameters.timeouts); server_display_name.empty()) - { - server_display_name = config().getString("host", "localhost"); - } - - if (is_interactive) - { - std::cout << "Connected to " << server_name << " server version " << server_version << " revision " << server_revision << "." - << std::endl - << std::endl; - - auto client_version_tuple = std::make_tuple(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH); - auto server_version_tuple = std::make_tuple(server_version_major, server_version_minor, server_version_patch); - - if (client_version_tuple < server_version_tuple) - { - std::cout << "ClickHouse client version is older than ClickHouse server. " - << "It may lack support for new features." << std::endl - << std::endl; - } - else if (client_version_tuple > server_version_tuple) - { - std::cout << "ClickHouse server version is older than ClickHouse client. " - << "It may indicate that the server is out of date and can be upgraded." << std::endl - << std::endl; - } - } - - if (!context->getSettingsRef().use_client_time_zone) - { - const auto & time_zone = connection->getServerTimezone(connection_parameters.timeouts); - if (!time_zone.empty()) - { - try - { - DateLUT::setDefaultTimezone(time_zone); - } - catch (...) - { - std::cerr << "Warning: could not switch to server time zone: " << time_zone - << ", reason: " << getCurrentExceptionMessage(/* with_stacktrace = */ false) << std::endl - << "Proceeding with local time zone." << std::endl - << std::endl; - } - } - else - { - std::cerr << "Warning: could not determine server time zone. " - << "Proceeding with local time zone." << std::endl - << std::endl; - } - } - - Strings keys; - - prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name.default", "{display_name} :) "); - - config().keys("prompt_by_server_display_name", keys); - - for (const String & key : keys) - { - if (key != "default" && server_display_name.find(key) != std::string::npos) - { - prompt_by_server_display_name = config().getRawString("prompt_by_server_display_name." + key); - break; - } - } - - /// Prompt may contain escape sequences including \e[ or \x1b[ sequences to set terminal color. - { - String unescaped_prompt_by_server_display_name; - ReadBufferFromString in(prompt_by_server_display_name); - readEscapedString(unescaped_prompt_by_server_display_name, in); - prompt_by_server_display_name = std::move(unescaped_prompt_by_server_display_name); - } - - /// Prompt may contain the following substitutions in a form of {name}. - std::map prompt_substitutions{ - {"host", connection_parameters.host}, - {"port", toString(connection_parameters.port)}, - {"user", connection_parameters.user}, - {"display_name", server_display_name}, - }; - - /// Quite suboptimal. - for (const auto & [key, value] : prompt_substitutions) - boost::replace_all(prompt_by_server_display_name, "{" + key + "}", value); - } - - - inline String prompt() const - { - return boost::replace_all_copy(prompt_by_server_display_name, "{database}", config().getString("database", "default")); - } - - - void nonInteractive() - { - String text; - - if (!queries_files.empty()) - { - auto process_file = [&](const std::string & file) - { - connection->setDefaultDatabase(connection_parameters.default_database); - ReadBufferFromFile in(file); - readStringUntilEOF(text, in); - return processMultiQuery(text); - }; - - for (const auto & queries_file : queries_files) - { - for (const auto & interleave_file : interleave_queries_files) - if (!process_file(interleave_file)) - return; - - if (!process_file(queries_file)) - return; - } - return; - } - else if (config().has("query")) - { - text = config().getRawString("query"); /// Poco configuration should not process substitutions in form of ${...} inside query. - } - else - { - /// If 'query' parameter is not set, read a query from stdin. - /// The query is read entirely into memory (streaming is disabled). - ReadBufferFromFileDescriptor in(STDIN_FILENO); - readStringUntilEOF(text, in); - } - - if (query_fuzzer_runs) - processWithFuzzing(text); - else - processQueryText(text); - } - - bool processQueryText(const String & text) - { - if (exit_strings.end() != exit_strings.find(trim(text, [](char c) { return isWhitespaceASCII(c) || c == ';'; }))) - return false; - - if (!config().has("multiquery")) - { - assert(!query_fuzzer_runs); - processTextAsSingleQuery(text); + have_error = false; + server_exception.reset(); + client_exception.reset(); return true; } - if (query_fuzzer_runs) - { - processWithFuzzing(text); - return true; - } - - return processMultiQuery(text); - } - - // Consumes trailing semicolons and tries to consume the same-line trailing - // comment. - static void adjustQueryEnd(const char *& this_query_end, const char * all_queries_end, int max_parser_depth) - { - // We have to skip the trailing semicolon that might be left - // after VALUES parsing or just after a normal semicolon-terminated query. - Tokens after_query_tokens(this_query_end, all_queries_end); - IParser::Pos after_query_iterator(after_query_tokens, max_parser_depth); - while (after_query_iterator.isValid() && after_query_iterator->type == TokenType::Semicolon) - { - this_query_end = after_query_iterator->end; - ++after_query_iterator; - } - - // Now we have to do some extra work to add the trailing - // same-line comment to the query, but preserve the leading - // comments of the next query. The trailing comment is important - // because the test hints are usually written this way, e.g.: - // select nonexistent_column; -- { serverError 12345 }. - // The token iterator skips comments and whitespace, so we have - // to find the newline in the string manually. If it's earlier - // than the next significant token, it means that the text before - // newline is some trailing whitespace or comment, and we should - // add it to our query. There are also several special cases - // that are described below. - const auto * newline = find_first_symbols<'\n'>(this_query_end, all_queries_end); - const char * next_query_begin = after_query_iterator->begin; - - // We include the entire line if the next query starts after - // it. This is a generic case of trailing in-line comment. - // The "equals" condition is for case of end of input (they both equal - // all_queries_end); - if (newline <= next_query_begin) - { - assert(newline >= this_query_end); - this_query_end = newline; - } - else - { - // Many queries on one line, can't do anything. By the way, this - // syntax is probably going to work as expected: - // select nonexistent /* { serverError 12345 } */; select 1 - } - } - - void reportQueryError() const - { - if (server_exception) - { - bool print_stack_trace = config().getBool("stacktrace", false); - std::cerr << "Received exception from server (version " << server_version << "):" << std::endl - << getExceptionMessage(*server_exception, print_stack_trace, true) << std::endl; - if (is_interactive) - std::cerr << std::endl; - } - - if (client_exception) - { - fmt::print(stderr, "Error on processing query '{}':\n{}\n", full_query, client_exception->message()); - if (is_interactive) - { - fmt::print(stderr, "\n"); - } - } - - // A debug check -- at least some exception must be set, if the error - // flag is set, and vice versa. - assert(have_error == (client_exception || server_exception)); - } - - bool processMultiQuery(const String & all_queries_text) - { - // It makes sense not to base any control flow on this, so that it is - // the same in tests and in normal usage. The only difference is that in - // normal mode we ignore the test hints. - const bool test_mode = config().has("testmode"); - - { - /// disable logs if expects errors - TestHint test_hint(test_mode, all_queries_text); - if (test_hint.clientError() || test_hint.serverError()) - processTextAsSingleQuery("SET send_logs_level = 'fatal'"); - } - - bool echo_query = echo_queries; - - /// Several queries separated by ';'. - /// INSERT data is ended by the end of line, not ';'. - /// An exception is VALUES format where we also support semicolon in - /// addition to end of line. - - const char * this_query_begin = all_queries_text.data(); - const char * all_queries_end = all_queries_text.data() + all_queries_text.size(); - - while (this_query_begin < all_queries_end) - { - // Remove leading empty newlines and other whitespace, because they - // are annoying to filter in query log. This is mostly relevant for - // the tests. - while (this_query_begin < all_queries_end && isWhitespaceASCII(*this_query_begin)) - { - ++this_query_begin; - } - if (this_query_begin >= all_queries_end) - { - break; - } - - // If there are only comments left until the end of file, we just - // stop. The parser can't handle this situation because it always - // expects that there is some query that it can parse. - // We can get into this situation because the parser also doesn't - // skip the trailing comments after parsing a query. This is because - // they may as well be the leading comments for the next query, - // and it makes more sense to treat them as such. - { - Tokens tokens(this_query_begin, all_queries_end); - IParser::Pos token_iterator(tokens, context->getSettingsRef().max_parser_depth); - if (!token_iterator.isValid()) - { - break; - } - } - - // Try to parse the query. - const char * this_query_end = this_query_begin; - try - { - parsed_query = parseQuery(this_query_end, all_queries_end, true); - } - catch (Exception & e) - { - // Try to find test hint for syntax error. We don't know where - // the query ends because we failed to parse it, so we consume - // the entire line. - this_query_end = find_first_symbols<'\n'>(this_query_end, all_queries_end); - - TestHint hint(test_mode, String(this_query_begin, this_query_end - this_query_begin)); - - if (hint.serverError()) - { - // Syntax errors are considered as client errors - e.addMessage("\nExpected server error '{}'.", hint.serverError()); - throw; - } - - if (hint.clientError() != e.code()) - { - if (hint.clientError()) - e.addMessage("\nExpected client error: " + std::to_string(hint.clientError())); - throw; - } - - /// It's expected syntax error, skip the line - this_query_begin = this_query_end; - continue; - } - - if (!parsed_query) - { - if (ignore_error) - { - Tokens tokens(this_query_begin, all_queries_end); - IParser::Pos token_iterator(tokens, context->getSettingsRef().max_parser_depth); - while (token_iterator->type != TokenType::Semicolon && token_iterator.isValid()) - ++token_iterator; - this_query_begin = token_iterator->end; - - continue; - } - - return true; - } - - // INSERT queries may have the inserted data in the query text - // that follow the query itself, e.g. "insert into t format CSV 1;2". - // They need special handling. First of all, here we find where the - // inserted data ends. In multy-query mode, it is delimited by a - // newline. - // The VALUES format needs even more handling -- we also allow the - // data to be delimited by semicolon. This case is handled later by - // the format parser itself. - // We can't do multiline INSERTs with inline data, because most - // row input formats (e.g. TSV) can't tell when the input stops, - // unlike VALUES. - auto * insert_ast = parsed_query->as(); - if (insert_ast && insert_ast->data) - { - this_query_end = find_first_symbols<'\n'>(insert_ast->data, all_queries_end); - insert_ast->end = this_query_end; - query_to_send = all_queries_text.substr(this_query_begin - all_queries_text.data(), insert_ast->data - this_query_begin); - } - else - { - query_to_send = all_queries_text.substr(this_query_begin - all_queries_text.data(), this_query_end - this_query_begin); - } - - // Try to include the trailing comment with test hints. It is just - // a guess for now, because we don't yet know where the query ends - // if it is an INSERT query with inline data. We will do it again - // after we have processed the query. But even this guess is - // beneficial so that we see proper trailing comments in "echo" and - // server log. - adjustQueryEnd(this_query_end, all_queries_end, context->getSettingsRef().max_parser_depth); - - // full_query is the query + inline INSERT data + trailing comments - // (the latter is our best guess for now). - full_query = all_queries_text.substr(this_query_begin - all_queries_text.data(), this_query_end - this_query_begin); - - if (query_fuzzer_runs) - { - if (!processWithFuzzing(full_query)) - return false; - - this_query_begin = this_query_end; - continue; - } - - // Now we know for sure where the query ends. - // Look for the hint in the text of query + insert data + trailing - // comments, - // e.g. insert into t format CSV 'a' -- { serverError 123 }. - // Use the updated query boundaries we just calculated. - TestHint test_hint(test_mode, std::string(this_query_begin, this_query_end - this_query_begin)); - - // Echo all queries if asked; makes for a more readable reference - // file. - echo_query = test_hint.echoQueries().value_or(echo_query); - - try - { - processParsedSingleQuery(echo_query); - } - catch (...) - { - // Surprisingly, this is a client error. A server error would - // have been reported w/o throwing (see onReceiveSeverException()). - client_exception = std::make_unique(getCurrentExceptionMessage(true), getCurrentExceptionCode()); - have_error = true; - } - - // For INSERTs with inline data: use the end of inline data as - // reported by the format parser (it is saved in sendData()). - // This allows us to handle queries like: - // insert into t values (1); select 1 - // , where the inline data is delimited by semicolon and not by a - // newline. - if (insert_ast && insert_ast->data) - { - this_query_end = insert_ast->end; - adjustQueryEnd(this_query_end, all_queries_end, context->getSettingsRef().max_parser_depth); - } - - // Check whether the error (or its absence) matches the test hints - // (or their absence). - bool error_matches_hint = true; - if (have_error) - { - if (test_hint.serverError()) - { - if (!server_exception) - { - error_matches_hint = false; - fmt::print(stderr, "Expected server error code '{}' but got no server error.\n", test_hint.serverError()); - } - else if (server_exception->code() != test_hint.serverError()) - { - error_matches_hint = false; - std::cerr << "Expected server error code: " << test_hint.serverError() << " but got: " << server_exception->code() - << "." << std::endl; - } - } - - if (test_hint.clientError()) - { - if (!client_exception) - { - error_matches_hint = false; - fmt::print(stderr, "Expected client error code '{}' but got no client error.\n", test_hint.clientError()); - } - else if (client_exception->code() != test_hint.clientError()) - { - error_matches_hint = false; - fmt::print( - stderr, "Expected client error code '{}' but got '{}'.\n", test_hint.clientError(), client_exception->code()); - } - } - - if (!test_hint.clientError() && !test_hint.serverError()) - { - // No error was expected but it still occurred. This is the - // default case w/o test hint, doesn't need additional - // diagnostics. - error_matches_hint = false; - } - } - else - { - if (test_hint.clientError()) - { - fmt::print(stderr, "The query succeeded but the client error '{}' was expected.\n", test_hint.clientError()); - error_matches_hint = false; - } - - if (test_hint.serverError()) - { - fmt::print(stderr, "The query succeeded but the server error '{}' was expected.\n", test_hint.serverError()); - error_matches_hint = false; - } - } - - // If the error is expected, force reconnect and ignore it. - if (have_error && error_matches_hint) - { - client_exception.reset(); - server_exception.reset(); - have_error = false; - - if (!connection->checkConnected()) - connect(); - } - - // Report error. - if (have_error) - { - reportQueryError(); - } - - // Stop processing queries if needed. - if (have_error && !ignore_error) - { - if (is_interactive) - { - break; - } - else - { - return false; - } - } - - this_query_begin = this_query_end; - } - - return true; - } - - // Prints changed settings to stderr. Useful for debugging fuzzing failures. - void printChangedSettings() const - { - const auto & changes = context->getSettingsRef().changes(); - if (!changes.empty()) - { - fmt::print(stderr, "Changed settings: "); - for (size_t i = 0; i < changes.size(); ++i) - { - if (i) - { - fmt::print(stderr, ", "); - } - fmt::print(stderr, "{} = '{}'", changes[i].name, toString(changes[i].value)); - } - fmt::print(stderr, "\n"); - } - else - { - fmt::print(stderr, "No changed settings.\n"); - } - } - - /// Returns false when server is not available. - bool processWithFuzzing(const String & text) - { - ASTPtr orig_ast; - - try - { - const char * begin = text.data(); - orig_ast = parseQuery(begin, begin + text.size(), true); - } - catch (const Exception & e) - { - if (e.code() != ErrorCodes::SYNTAX_ERROR && - e.code() != ErrorCodes::TOO_DEEP_RECURSION) - throw; - } - - if (!orig_ast) - { - // Can't continue after a parsing error - return true; - } - - // Don't repeat inserts, the tables grow too big. Also don't repeat - // creates because first we run the unmodified query, it will succeed, - // and the subsequent queries will fail. When we run out of fuzzer - // errors, it may be interesting to add fuzzing of create queries that - // wraps columns into LowCardinality or Nullable. Also there are other - // kinds of create queries such as CREATE DICTIONARY, we could fuzz - // them as well. Also there is no point fuzzing DROP queries. - size_t this_query_runs = query_fuzzer_runs; - if (orig_ast->as() || orig_ast->as() || orig_ast->as()) - { - this_query_runs = 1; - } - - ASTPtr fuzz_base = orig_ast; - for (size_t fuzz_step = 0; fuzz_step < this_query_runs; ++fuzz_step) - { - fmt::print(stderr, "Fuzzing step {} out of {}\n", fuzz_step, this_query_runs); - - ASTPtr ast_to_process; - try - { - WriteBufferFromOwnString dump_before_fuzz; - fuzz_base->dumpTree(dump_before_fuzz); - auto base_before_fuzz = fuzz_base->formatForErrorMessage(); - - ast_to_process = fuzz_base->clone(); - - WriteBufferFromOwnString dump_of_cloned_ast; - ast_to_process->dumpTree(dump_of_cloned_ast); - - // Run the original query as well. - if (fuzz_step > 0) - { - fuzzer.fuzzMain(ast_to_process); - } - - auto base_after_fuzz = fuzz_base->formatForErrorMessage(); - - // Check that the source AST didn't change after fuzzing. This - // helps debug AST cloning errors, where the cloned AST doesn't - // clone all its children, and erroneously points to some source - // child elements. - if (base_before_fuzz != base_after_fuzz) - { - printChangedSettings(); - - fmt::print( - stderr, - "Base before fuzz: {}\n" - "Base after fuzz: {}\n", - base_before_fuzz, - base_after_fuzz); - fmt::print(stderr, "Dump before fuzz:\n{}\n", dump_before_fuzz.str()); - fmt::print(stderr, "Dump of cloned AST:\n{}\n", dump_of_cloned_ast.str()); - fmt::print(stderr, "Dump after fuzz:\n"); - - WriteBufferFromOStream cerr_buf(std::cerr, 4096); - fuzz_base->dumpTree(cerr_buf); - cerr_buf.next(); - - fmt::print( - stderr, - "Found error: IAST::clone() is broken for some AST node. This is a bug. The original AST ('dump before fuzz') and its cloned copy ('dump of cloned AST') refer to the same nodes, which must never happen. This means that their parent node doesn't implement clone() correctly."); - - exit(1); - } - - auto fuzzed_text = ast_to_process->formatForErrorMessage(); - if (fuzz_step > 0 && fuzzed_text == base_before_fuzz) - { - fmt::print(stderr, "Got boring AST\n"); - continue; - } - - parsed_query = ast_to_process; - query_to_send = parsed_query->formatForErrorMessage(); - - processParsedSingleQuery(); - } - catch (...) - { - // Some functions (e.g. protocol parsers) don't throw, but - // set last_exception instead, so we'll also do it here for - // uniformity. - // Surprisingly, this is a client exception, because we get the - // server exception w/o throwing (see onReceiveException()). - client_exception = std::make_unique(getCurrentExceptionMessage(true), getCurrentExceptionCode()); - have_error = true; - } - - const auto * exception = server_exception ? server_exception.get() : client_exception.get(); - // Sometimes you may get TOO_DEEP_RECURSION from the server, - // and TOO_DEEP_RECURSION should not fail the fuzzer check. - if (have_error && exception->code() == ErrorCodes::TOO_DEEP_RECURSION) - { - have_error = false; - server_exception.reset(); - client_exception.reset(); - return true; - } - - if (have_error) - { - fmt::print(stderr, "Error on processing query '{}': {}\n", ast_to_process->formatForErrorMessage(), exception->message()); - - // Try to reconnect after errors, for two reasons: - // 1. We might not have realized that the server died, e.g. if - // it sent us a trace and closed connection properly. - // 2. The connection might have gotten into a wrong state and - // the next query will get false positive about - // "Unknown packet from server". - try - { - connection->forceConnected(connection_parameters.timeouts); - } - catch (...) - { - // Just report it, we'll terminate below. - fmt::print(stderr, - "Error while reconnecting to the server: {}\n", - getCurrentExceptionMessage(true)); - - // The reconnection might fail, but we'll still be connected - // in the sense of `connection->isConnected() = true`, - // in case when the requested database doesn't exist. - // Disconnect manually now, so that the following code doesn't - // have any doubts, and the connection state is predictable. - connection->disconnect(); - } - } - - if (!connection->isConnected()) - { - // Probably the server is dead because we found an assertion - // failure. Fail fast. - fmt::print(stderr, "Lost connection to the server.\n"); - - // Print the changed settings because they might be needed to - // reproduce the error. - printChangedSettings(); - - return false; - } - - // Check that after the query is formatted, we can parse it back, - // format again and get the same result. Unfortunately, we can't - // compare the ASTs, which would be more sensitive to errors. This - // double formatting check doesn't catch all errors, e.g. we can - // format query incorrectly, but to a valid SQL that we can then - // parse and format into the same SQL. - // There are some complicated cases where we can generate the SQL - // which we can't parse: - // * first argument of lambda() replaced by fuzzer with - // something else, leading to constructs such as - // arrayMap((min(x) + 3) -> x + 1, ....) - // * internals of Enum replaced, leading to: - // Enum(equals(someFunction(y), 3)). - // And there are even the cases when we can parse the query, but - // it's logically incorrect and its formatting is a mess, such as - // when `lambda()` function gets substituted into a wrong place. - // To avoid dealing with these cases, run the check only for the - // queries we were able to successfully execute. - // Another caveat is that sometimes WITH queries are not executed, - // if they are not referenced by the main SELECT, so they can still - // have the aforementioned problems. Disable this check for such - // queries, for lack of a better solution. - // There is also a problem that fuzzer substitutes positive Int64 - // literals or Decimal literals, which are then parsed back as - // UInt64, and suddenly duplicate alias substitition starts or stops - // working (ASTWithAlias::formatImpl) or something like that. - // So we compare not even the first and second formatting of the - // query, but second and third. - // If you have to add any more workarounds to this check, just remove - // it altogether, it's not so useful. - if (!have_error && !queryHasWithClause(parsed_query.get())) - { - ASTPtr ast_2; - try - { - const auto * tmp_pos = query_to_send.c_str(); - - ast_2 = parseQuery(tmp_pos, tmp_pos + query_to_send.size(), - false /* allow_multi_statements */); - } - catch (Exception & e) - { - if (e.code() != ErrorCodes::SYNTAX_ERROR && - e.code() != ErrorCodes::TOO_DEEP_RECURSION) - throw; - } - - if (ast_2) - { - const auto text_2 = ast_2->formatForErrorMessage(); - const auto * tmp_pos = text_2.c_str(); - const auto ast_3 = parseQuery(tmp_pos, tmp_pos + text_2.size(), - false /* allow_multi_statements */); - const auto text_3 = ast_3->formatForErrorMessage(); - if (text_3 != text_2) - { - fmt::print(stderr, "Found error: The query formatting is broken.\n"); - - printChangedSettings(); - - fmt::print(stderr, - "Got the following (different) text after formatting the fuzzed query and parsing it back:\n'{}'\n, expected:\n'{}'\n", - text_3, text_2); - fmt::print(stderr, "In more detail:\n"); - fmt::print(stderr, "AST-1 (generated by fuzzer):\n'{}'\n", parsed_query->dumpTree()); - fmt::print(stderr, "Text-1 (AST-1 formatted):\n'{}'\n", query_to_send); - fmt::print(stderr, "AST-2 (Text-1 parsed):\n'{}'\n", ast_2->dumpTree()); - fmt::print(stderr, "Text-2 (AST-2 formatted):\n'{}'\n", text_2); - fmt::print(stderr, "AST-3 (Text-2 parsed):\n'{}'\n", ast_3->dumpTree()); - fmt::print(stderr, "Text-3 (AST-3 formatted):\n'{}'\n", text_3); - fmt::print(stderr, "Text-3 must be equal to Text-2, but it is not.\n"); - - exit(1); - } - } - } - - // The server is still alive so we're going to continue fuzzing. - // Determine what we're going to use as the starting AST. - if (have_error) - { - // Query completed with error, keep the previous starting AST. - // Also discard the exception that we now know to be non-fatal, - // so that it doesn't influence the exit code. - server_exception.reset(); - client_exception.reset(); - have_error = false; - } - else if (ast_to_process->formatForErrorMessage().size() > 500) - { - // ast too long, start from original ast - fmt::print(stderr, "Current AST is too long, discarding it and using the original AST as a start\n"); - fuzz_base = orig_ast; - } - else - { - // fuzz starting from this successful query - fmt::print(stderr, "Query succeeded, using this AST as a start\n"); - fuzz_base = ast_to_process; - } - } - - return true; - } - - void processTextAsSingleQuery(const String & text_) - { - full_query = text_; - - /// Some parts of a query (result output and formatting) are executed - /// client-side. Thus we need to parse the query. - const char * begin = full_query.data(); - parsed_query = parseQuery(begin, begin + full_query.size(), false); - - if (!parsed_query) - return; - - // An INSERT query may have the data that follow query text. Remove the - /// Send part of query without data, because data will be sent separately. - auto * insert = parsed_query->as(); - if (insert && insert->data) - { - query_to_send = full_query.substr(0, insert->data - full_query.data()); - } - else - { - query_to_send = full_query; - } - - processParsedSingleQuery(); - if (have_error) { - reportQueryError(); - } - } - - // Parameters are in global variables: - // 'parsed_query' -- the query AST, - // 'query_to_send' -- the query text that is sent to server, - // 'full_query' -- for INSERT queries, contains the query and the data that - // follow it. Its memory is referenced by ASTInsertQuery::begin, end. - void processParsedSingleQuery(std::optional echo_query = {}) - { - resetOutput(); - client_exception.reset(); - server_exception.reset(); - have_error = false; - - if (echo_query.value_or(echo_queries)) - { - writeString(full_query, std_out); - writeChar('\n', std_out); - std_out.next(); - } - - if (is_interactive) - { - // Generate a new query_id - context->setCurrentQueryId(""); - for (const auto & query_id_format : query_id_formats) - { - writeString(query_id_format.first, std_out); - writeString(fmt::format(query_id_format.second, fmt::arg("query_id", context->getCurrentQueryId())), std_out); - writeChar('\n', std_out); - std_out.next(); - } - } - - processed_rows = 0; - written_first_block = false; - progress_indication.resetProgress(); - - { - /// Temporarily apply query settings to context. - std::optional old_settings; - SCOPE_EXIT_SAFE({ - if (old_settings) - context->setSettings(*old_settings); - }); - auto apply_query_settings = [&](const IAST & settings_ast) - { - if (!old_settings) - old_settings.emplace(context->getSettingsRef()); - context->applySettingsChanges(settings_ast.as()->changes); - }; - const auto * insert = parsed_query->as(); - if (insert && insert->settings_ast) - apply_query_settings(*insert->settings_ast); - /// FIXME: try to prettify this cast using `as<>()` - const auto * with_output = dynamic_cast(parsed_query.get()); - if (with_output && with_output->settings_ast) - apply_query_settings(*with_output->settings_ast); - - if (!connection->checkConnected()) - connect(); - - ASTPtr input_function; - if (insert && insert->select) - insert->tryFindInputFunction(input_function); - - /// INSERT query for which data transfer is needed (not an INSERT SELECT or input()) is processed separately. - if (insert && (!insert->select || input_function) && !insert->watch) - { - if (input_function && insert->format.empty()) - throw Exception("FORMAT must be specified for function input()", ErrorCodes::INVALID_USAGE_OF_INPUT); - processInsertQuery(); - } - else - processOrdinaryQuery(); - } - - /// Do not change context (current DB, settings) in case of an exception. - if (!have_error) - { - if (const auto * set_query = parsed_query->as()) - { - /// Save all changes in settings to avoid losing them if the connection is lost. - for (const auto & change : set_query->changes) - { - if (change.name == "profile") - current_profile = change.value.safeGet(); - else - context->applySettingChange(change); - } - } - - if (const auto * use_query = parsed_query->as()) - { - const String & new_database = use_query->database; - /// If the client initiates the reconnection, it takes the settings from the config. - config().setString("database", new_database); - /// If the connection initiates the reconnection, it uses its variable. - connection->setDefaultDatabase(new_database); - } - } - - if (is_interactive) - { - std::cout << std::endl << processed_rows << " rows in set. Elapsed: " << progress_indication.elapsedSeconds() << " sec. "; - /// Write final progress if it makes sense to do so. - writeFinalProgress(); - - std::cout << std::endl << std::endl; - } - else if (print_time_to_stderr) - { - std::cerr << progress_indication.elapsedSeconds() << "\n"; - } - } - - - /// Convert external tables to ExternalTableData and send them using the connection. - void sendExternalTables() - { - const auto * select = parsed_query->as(); - if (!select && !external_tables.empty()) - throw Exception("External tables could be sent only with select query", ErrorCodes::BAD_ARGUMENTS); - - std::vector data; - for (auto & table : external_tables) - data.emplace_back(table.getData(context)); - - connection->sendExternalTablesData(data); - } - - - /// Process the query that doesn't require transferring data blocks to the server. - void processOrdinaryQuery() - { - /// Rewrite query only when we have query parameters. - /// Note that if query is rewritten, comments in query are lost. - /// But the user often wants to see comments in server logs, query log, processlist, etc. - if (!query_parameters.empty()) - { - /// Replace ASTQueryParameter with ASTLiteral for prepared statements. - ReplaceQueryParameterVisitor visitor(query_parameters); - visitor.visit(parsed_query); - - /// Get new query after substitutions. Note that it cannot be done for INSERT query with embedded data. - query_to_send = serializeAST(*parsed_query); - } - - int retries_left = 10; - for (;;) - { - assert(retries_left > 0); + fmt::print(stderr, "Error on processing query '{}': {}\n", ast_to_process->formatForErrorMessage(), exception->message()); + // Try to reconnect after errors, for two reasons: + // 1. We might not have realized that the server died, e.g. if + // it sent us a trace and closed connection properly. + // 2. The connection might have gotten into a wrong state and + // the next query will get false positive about + // "Unknown packet from server". try { - connection->sendQuery( - connection_parameters.timeouts, - query_to_send, - context->getCurrentQueryId(), - query_processing_stage, - &context->getSettingsRef(), - &context->getClientInfo(), - true); - - sendExternalTables(); - receiveResult(); - - break; + connection->forceConnected(connection_parameters.timeouts); } - catch (const Exception & e) + catch (...) { - /// Retry when the server said "Client should retry" and no rows - /// has been received yet. - if (processed_rows == 0 && e.code() == ErrorCodes::DEADLOCK_AVOIDED && --retries_left) - { - std::cerr << "Got a transient error from the server, will" - << " retry (" << retries_left << " retries left)"; - } - else - { + // Just report it, we'll terminate below. + fmt::print(stderr, + "Error while reconnecting to the server: {}\n", + getCurrentExceptionMessage(true)); + + // The reconnection might fail, but we'll still be connected + // in the sense of `connection->isConnected() = true`, + // in case when the requested database doesn't exist. + // Disconnect manually now, so that the following code doesn't + // have any doubts, and the connection state is predictable. + connection->disconnect(); + } + } + + if (!connection->isConnected()) + { + // Probably the server is dead because we found an assertion + // failure. Fail fast. + fmt::print(stderr, "Lost connection to the server.\n"); + + // Print the changed settings because they might be needed to + // reproduce the error. + printChangedSettings(); + + return false; + } + + // Check that after the query is formatted, we can parse it back, + // format again and get the same result. Unfortunately, we can't + // compare the ASTs, which would be more sensitive to errors. This + // double formatting check doesn't catch all errors, e.g. we can + // format query incorrectly, but to a valid SQL that we can then + // parse and format into the same SQL. + // There are some complicated cases where we can generate the SQL + // which we can't parse: + // * first argument of lambda() replaced by fuzzer with + // something else, leading to constructs such as + // arrayMap((min(x) + 3) -> x + 1, ....) + // * internals of Enum replaced, leading to: + // Enum(equals(someFunction(y), 3)). + // And there are even the cases when we can parse the query, but + // it's logically incorrect and its formatting is a mess, such as + // when `lambda()` function gets substituted into a wrong place. + // To avoid dealing with these cases, run the check only for the + // queries we were able to successfully execute. + // Another caveat is that sometimes WITH queries are not executed, + // if they are not referenced by the main SELECT, so they can still + // have the aforementioned problems. Disable this check for such + // queries, for lack of a better solution. + // There is also a problem that fuzzer substitutes positive Int64 + // literals or Decimal literals, which are then parsed back as + // UInt64, and suddenly duplicate alias substitition starts or stops + // working (ASTWithAlias::formatImpl) or something like that. + // So we compare not even the first and second formatting of the + // query, but second and third. + // If you have to add any more workarounds to this check, just remove + // it altogether, it's not so useful. + if (!have_error && !queryHasWithClause(parsed_query.get())) + { + ASTPtr ast_2; + try + { + const auto * tmp_pos = query_to_execute.c_str(); + + ast_2 = parseQuery(tmp_pos, tmp_pos + query_to_execute.size(), false /* allow_multi_statements */); + } + catch (Exception & e) + { + if (e.code() != ErrorCodes::SYNTAX_ERROR && + e.code() != ErrorCodes::TOO_DEEP_RECURSION) throw; + } + + if (ast_2) + { + const auto text_2 = ast_2->formatForErrorMessage(); + const auto * tmp_pos = text_2.c_str(); + const auto ast_3 = parseQuery(tmp_pos, tmp_pos + text_2.size(), + false /* allow_multi_statements */); + const auto text_3 = ast_3->formatForErrorMessage(); + if (text_3 != text_2) + { + fmt::print(stderr, "Found error: The query formatting is broken.\n"); + + printChangedSettings(); + + fmt::print(stderr, + "Got the following (different) text after formatting the fuzzed query and parsing it back:\n'{}'\n, expected:\n'{}'\n", + text_3, text_2); + fmt::print(stderr, "In more detail:\n"); + fmt::print(stderr, "AST-1 (generated by fuzzer):\n'{}'\n", parsed_query->dumpTree()); + fmt::print(stderr, "Text-1 (AST-1 formatted):\n'{}'\n", query_to_execute); + fmt::print(stderr, "AST-2 (Text-1 parsed):\n'{}'\n", ast_2->dumpTree()); + fmt::print(stderr, "Text-2 (AST-2 formatted):\n'{}'\n", text_2); + fmt::print(stderr, "AST-3 (Text-2 parsed):\n'{}'\n", ast_3->dumpTree()); + fmt::print(stderr, "Text-3 (AST-3 formatted):\n'{}'\n", text_3); + fmt::print(stderr, "Text-3 must be equal to Text-2, but it is not.\n"); + + exit(1); } } } - } - - /// Process the query that requires transferring data blocks to the server. - void processInsertQuery() - { - const auto parsed_insert_query = parsed_query->as(); - if ((!parsed_insert_query.data && !parsed_insert_query.infile) && (is_interactive || (!stdin_is_a_tty && std_in.eof()))) - throw Exception("No data to insert", ErrorCodes::NO_DATA_TO_INSERT); - - connection->sendQuery( - connection_parameters.timeouts, - query_to_send, - context->getCurrentQueryId(), - query_processing_stage, - &context->getSettingsRef(), - &context->getClientInfo(), - true); - - sendExternalTables(); - - /// Receive description of table structure. - Block sample; - ColumnsDescription columns_description; - if (receiveSampleBlock(sample, columns_description)) + // The server is still alive so we're going to continue fuzzing. + // Determine what we're going to use as the starting AST. + if (have_error) { - /// If structure was received (thus, server has not thrown an exception), - /// send our data with that structure. - sendData(sample, columns_description); - receiveEndOfQuery(); + // Query completed with error, keep the previous starting AST. + // Also discard the exception that we now know to be non-fatal, + // so that it doesn't influence the exit code. + server_exception.reset(); + client_exception.reset(); + have_error = false; } - } - - - ASTPtr parseQuery(const char *& pos, const char * end, bool allow_multi_statements) - { - ParserQuery parser(end); - ASTPtr res; - - const auto & settings = context->getSettingsRef(); - size_t max_length = 0; - if (!allow_multi_statements) - max_length = settings.max_query_size; - - if (is_interactive || ignore_error) + else if (ast_to_process->formatForErrorMessage().size() > 500) { - String message; - res = tryParseQuery(parser, pos, end, message, true, "", allow_multi_statements, max_length, settings.max_parser_depth); - - if (!res) - { - std::cerr << std::endl << message << std::endl << std::endl; - return nullptr; - } + // ast too long, start from original ast + fmt::print(stderr, "Current AST is too long, discarding it and using the original AST as a start\n"); + fuzz_base = orig_ast; } else - res = parseQueryAndMovePosition(parser, pos, end, "", allow_multi_statements, max_length, settings.max_parser_depth); - - if (is_interactive) { - std::cout << std::endl; - WriteBufferFromOStream res_buf(std::cout, 4096); - formatAST(*res, res_buf); - res_buf.next(); - std::cout << std::endl << std::endl; - } - - return res; - } - - - void sendData(Block & sample, const ColumnsDescription & columns_description) - { - /// If INSERT data must be sent. - auto * parsed_insert_query = parsed_query->as(); - if (!parsed_insert_query) - return; - - if (parsed_insert_query->infile) - { - const auto & in_file_node = parsed_insert_query->infile->as(); - const auto in_file = in_file_node.value.safeGet(); - - auto in_buffer = wrapReadBufferWithCompressionMethod(std::make_unique(in_file), chooseCompressionMethod(in_file, "")); - - try - { - sendDataFrom(*in_buffer, sample, columns_description); - } - catch (Exception & e) - { - e.addMessage("data for INSERT was parsed from file"); - throw; - } - } - else if (parsed_insert_query->data) - { - /// Send data contained in the query. - ReadBufferFromMemory data_in(parsed_insert_query->data, parsed_insert_query->end - parsed_insert_query->data); - try - { - sendDataFrom(data_in, sample, columns_description); - } - catch (Exception & e) - { - /// The following query will use data from input - // "INSERT INTO data FORMAT TSV\n " < data.csv - // And may be pretty hard to debug, so add information about data source to make it easier. - e.addMessage("data for INSERT was parsed from query"); - throw; - } - // Remember where the data ended. We use this info later to determine - // where the next query begins. - parsed_insert_query->end = parsed_insert_query->data + data_in.count(); - } - else if (!is_interactive) - { - /// Send data read from stdin. - try - { - if (need_render_progress) - { - /// Set total_bytes_to_read for current fd. - FileProgress file_progress(0, std_in.size()); - progress_indication.updateProgress(Progress(file_progress)); - - /// Set callback to be called on file progress. - progress_indication.setFileProgressCallback(context, true); - - /// Add callback to track reading from fd. - std_in.setProgressCallback(context); - } - - sendDataFrom(std_in, sample, columns_description); - } - catch (Exception & e) - { - e.addMessage("data for INSERT was parsed from stdin"); - throw; - } - } - else - throw Exception("No data to insert", ErrorCodes::NO_DATA_TO_INSERT); - } - - - void sendDataFrom(ReadBuffer & buf, Block & sample, const ColumnsDescription & columns_description) - { - String current_format = insert_format; - - /// Data format can be specified in the INSERT query. - if (const auto * insert = parsed_query->as()) - { - if (!insert->format.empty()) - current_format = insert->format; - } - - auto source = FormatFactory::instance().getInput(current_format, buf, sample, context, insert_format_max_block_size); - Pipe pipe(source); - - if (columns_description.hasDefaults()) - { - pipe.addSimpleTransform([&](const Block & header) - { - return std::make_shared(header, columns_description, *source, context); - }); - } - - QueryPipeline pipeline; - pipeline.init(std::move(pipe)); - PullingAsyncPipelineExecutor executor(pipeline); - - Block block; - while (executor.pull(block)) - { - /// Check if server send Log packet - receiveLogs(); - - /// Check if server send Exception packet - auto packet_type = connection->checkPacket(); - if (packet_type && *packet_type == Protocol::Server::Exception) - { - /* - * We're exiting with error, so it makes sense to kill the - * input stream without waiting for it to complete. - */ - executor.cancel(); - return; - } - - if (block) - { - connection->sendData(block); - processed_rows += block.rows(); - } - } - - connection->sendData({}); - } - - - /// Flush all buffers. - void resetOutput() - { - block_out_stream.reset(); - logs_out_stream.reset(); - - if (pager_cmd) - { - pager_cmd->in.close(); - pager_cmd->wait(); - } - pager_cmd = nullptr; - - if (out_file_buf) - { - out_file_buf->next(); - out_file_buf.reset(); - } - - if (out_logs_buf) - { - out_logs_buf->next(); - out_logs_buf.reset(); - } - - std_out.next(); - } - - - /// Receives and processes packets coming from server. - /// Also checks if query execution should be cancelled. - void receiveResult() - { - InterruptListener interrupt_listener; - bool cancelled = false; - - // TODO: get the poll_interval from commandline. - const auto receive_timeout = connection_parameters.timeouts.receive_timeout; - constexpr size_t default_poll_interval = 1000000; /// in microseconds - constexpr size_t min_poll_interval = 5000; /// in microseconds - const size_t poll_interval - = std::max(min_poll_interval, std::min(receive_timeout.totalMicroseconds(), default_poll_interval)); - - while (true) - { - Stopwatch receive_watch(CLOCK_MONOTONIC_COARSE); - - while (true) - { - /// Has the Ctrl+C been pressed and thus the query should be cancelled? - /// If this is the case, inform the server about it and receive the remaining packets - /// to avoid losing sync. - if (!cancelled) - { - auto cancel_query = [&] { - connection->sendCancel(); - cancelled = true; - if (is_interactive) - { - progress_indication.clearProgressOutput(); - std::cout << "Cancelling query." << std::endl; - } - - /// Pressing Ctrl+C twice results in shut down. - interrupt_listener.unblock(); - }; - - if (interrupt_listener.check()) - { - cancel_query(); - } - else - { - double elapsed = receive_watch.elapsedSeconds(); - if (elapsed > receive_timeout.totalSeconds()) - { - std::cout << "Timeout exceeded while receiving data from server." - << " Waited for " << static_cast(elapsed) << " seconds," - << " timeout is " << receive_timeout.totalSeconds() << " seconds." << std::endl; - - cancel_query(); - } - } - } - - /// Poll for changes after a cancellation check, otherwise it never reached - /// because of progress updates from server. - if (connection->poll(poll_interval)) - break; - } - - if (!receiveAndProcessPacket(cancelled)) - break; - } - - if (cancelled && is_interactive) - std::cout << "Query was cancelled." << std::endl; - } - - - /// Receive a part of the result, or progress info or an exception and process it. - /// Returns true if one should continue receiving packets. - /// Output of result is suppressed if query was cancelled. - bool receiveAndProcessPacket(bool cancelled) - { - Packet packet = connection->receivePacket(); - - switch (packet.type) - { - case Protocol::Server::PartUUIDs: - return true; - - case Protocol::Server::Data: - if (!cancelled) - onData(packet.block); - return true; - - case Protocol::Server::Progress: - onProgress(packet.progress); - return true; - - case Protocol::Server::ProfileInfo: - onProfileInfo(packet.profile_info); - return true; - - case Protocol::Server::Totals: - if (!cancelled) - onTotals(packet.block); - return true; - - case Protocol::Server::Extremes: - if (!cancelled) - onExtremes(packet.block); - return true; - - case Protocol::Server::Exception: - onReceiveExceptionFromServer(std::move(packet.exception)); - return false; - - case Protocol::Server::Log: - onLogData(packet.block); - return true; - - case Protocol::Server::EndOfStream: - onEndOfStream(); - return false; - - default: - throw Exception( - ErrorCodes::UNKNOWN_PACKET_FROM_SERVER, "Unknown packet {} from server {}", packet.type, connection->getDescription()); + // fuzz starting from this successful query + fmt::print(stderr, "Query succeeded, using this AST as a start\n"); + fuzz_base = ast_to_process; } } - - /// Receive the block that serves as an example of the structure of table where data will be inserted. - bool receiveSampleBlock(Block & out, ColumnsDescription & columns_description) - { - while (true) - { - Packet packet = connection->receivePacket(); - - switch (packet.type) - { - case Protocol::Server::Data: - out = packet.block; - return true; - - case Protocol::Server::Exception: - onReceiveExceptionFromServer(std::move(packet.exception)); - return false; - - case Protocol::Server::Log: - onLogData(packet.block); - break; - - case Protocol::Server::TableColumns: - columns_description = ColumnsDescription::parse(packet.multistring_message[1]); - return receiveSampleBlock(out, columns_description); - - default: - throw NetException( - "Unexpected packet from server (expected Data, Exception or Log, got " - + String(Protocol::Server::toString(packet.type)) + ")", - ErrorCodes::UNEXPECTED_PACKET_FROM_SERVER); - } - } - } - - - /// Process Log packets, exit when receive Exception or EndOfStream - bool receiveEndOfQuery() - { - while (true) - { - Packet packet = connection->receivePacket(); - - switch (packet.type) - { - case Protocol::Server::EndOfStream: - onEndOfStream(); - return true; - - case Protocol::Server::Exception: - onReceiveExceptionFromServer(std::move(packet.exception)); - return false; - - case Protocol::Server::Log: - onLogData(packet.block); - break; - - default: - throw NetException( - "Unexpected packet from server (expected Exception, EndOfStream or Log, got " - + String(Protocol::Server::toString(packet.type)) + ")", - ErrorCodes::UNEXPECTED_PACKET_FROM_SERVER); - } - } - } - - /// Process Log packets, used when inserting data by blocks - void receiveLogs() - { - auto packet_type = connection->checkPacket(); - - while (packet_type && *packet_type == Protocol::Server::Log) - { - receiveAndProcessPacket(false); - packet_type = connection->checkPacket(); - } - } - - void initBlockOutputStream(const Block & block) - { - if (!block_out_stream) - { - /// Ignore all results when fuzzing as they can be huge. - if (query_fuzzer_runs) - { - block_out_stream = std::make_shared(block); - return; - } - - WriteBuffer * out_buf = nullptr; - String pager = config().getString("pager", ""); - if (!pager.empty()) - { - signal(SIGPIPE, SIG_IGN); - pager_cmd = ShellCommand::execute(pager, true); - out_buf = &pager_cmd->in; - } - else - { - out_buf = &std_out; - } - - String current_format = format; - - /// The query can specify output format or output file. - /// FIXME: try to prettify this cast using `as<>()` - if (const auto * query_with_output = dynamic_cast(parsed_query.get())) - { - if (query_with_output->out_file) - { - const auto & out_file_node = query_with_output->out_file->as(); - const auto & out_file = out_file_node.value.safeGet(); - - out_file_buf = wrapWriteBufferWithCompressionMethod( - std::make_unique(out_file, DBMS_DEFAULT_BUFFER_SIZE, O_WRONLY | O_EXCL | O_CREAT), - chooseCompressionMethod(out_file, ""), - /* compression level = */ 3 - ); - - // We are writing to file, so default format is the same as in non-interactive mode. - if (is_interactive && is_default_format) - current_format = "TabSeparated"; - } - if (query_with_output->format != nullptr) - { - if (has_vertical_output_suffix) - throw Exception("Output format already specified", ErrorCodes::CLIENT_OUTPUT_FORMAT_SPECIFIED); - const auto & id = query_with_output->format->as(); - current_format = id.name(); - } - } - - if (has_vertical_output_suffix) - current_format = "Vertical"; - - /// It is not clear how to write progress with parallel formatting. It may increase code complexity significantly. - if (!need_render_progress) - block_out_stream = context->getOutputStreamParallelIfPossible(current_format, out_file_buf ? *out_file_buf : *out_buf, block); - else - block_out_stream = context->getOutputStream(current_format, out_file_buf ? *out_file_buf : *out_buf, block); - - block_out_stream->writePrefix(); - } - } - - - void initLogsOutputStream() - { - if (!logs_out_stream) - { - WriteBuffer * wb = out_logs_buf.get(); - - if (!out_logs_buf) - { - if (server_logs_file.empty()) - { - /// Use stderr by default - out_logs_buf = std::make_unique(STDERR_FILENO); - wb = out_logs_buf.get(); - } - else if (server_logs_file == "-") - { - /// Use stdout if --server_logs_file=- specified - wb = &std_out; - } - else - { - out_logs_buf - = std::make_unique(server_logs_file, DBMS_DEFAULT_BUFFER_SIZE, O_WRONLY | O_APPEND | O_CREAT); - wb = out_logs_buf.get(); - } - } - - logs_out_stream = std::make_shared(*wb, stdout_is_a_tty); - logs_out_stream->writePrefix(); - } - } - - - void onData(Block & block) - { - if (!block) - return; - - processed_rows += block.rows(); - - /// Even if all blocks are empty, we still need to initialize the output stream to write empty resultset. - initBlockOutputStream(block); - - /// The header block containing zero rows was used to initialize - /// block_out_stream, do not output it. - /// Also do not output too much data if we're fuzzing. - if (block.rows() == 0 || (query_fuzzer_runs != 0 && processed_rows >= 100)) - return; - - if (need_render_progress) - progress_indication.clearProgressOutput(); - - block_out_stream->write(block); - written_first_block = true; - - /// Received data block is immediately displayed to the user. - block_out_stream->flush(); - - /// Restore progress bar after data block. - if (need_render_progress) - progress_indication.writeProgress(); - } - - - void onLogData(Block & block) - { - initLogsOutputStream(); - progress_indication.clearProgressOutput(); - logs_out_stream->write(block); - logs_out_stream->flush(); - } - - - void onTotals(Block & block) - { - initBlockOutputStream(block); - block_out_stream->setTotals(block); - } - - void onExtremes(Block & block) - { - initBlockOutputStream(block); - block_out_stream->setExtremes(block); - } - - - void onProgress(const Progress & value) - { - if (!progress_indication.updateProgress(value)) - { - // Just a keep-alive update. - return; - } - - if (block_out_stream) - block_out_stream->onProgress(value); - - if (need_render_progress) - progress_indication.writeProgress(); - } - - - void writeFinalProgress() - { - progress_indication.writeFinalProgress(); - } - - - void onReceiveExceptionFromServer(std::unique_ptr && e) - { - have_error = true; - server_exception = std::move(e); - resetOutput(); - } - - - void onProfileInfo(const BlockStreamProfileInfo & profile_info) - { - if (profile_info.hasAppliedLimit() && block_out_stream) - block_out_stream->setRowsBeforeLimit(profile_info.getRowsBeforeLimit()); - } - - - void onEndOfStream() - { - progress_indication.clearProgressOutput(); - - if (block_out_stream) - block_out_stream->writeSuffix(); - - if (logs_out_stream) - logs_out_stream->writeSuffix(); - - resetOutput(); - - if (is_interactive && !written_first_block) - { - progress_indication.clearProgressOutput(); - std::cout << "Ok." << std::endl; - } - } - - static void showClientVersion() - { - std::cout << DBMS_NAME << " client version " << VERSION_STRING << VERSION_OFFICIAL << "." << std::endl; - } - - static void clearTerminal() - { - /// Clear from cursor until end of screen. - /// It is needed if garbage is left in terminal. - /// Show cursor. It can be left hidden by invocation of previous programs. - /// A test for this feature: perl -e 'print "x"x100000'; echo -ne '\033[0;0H\033[?25l'; clickhouse-client - std::cout << "\033[0J" - "\033[?25h"; - } - -public: - void init(int argc, char ** argv) - { - /// Don't parse options with Poco library. We need more sophisticated processing. - stopOptionsProcessing(); - - /** We allow different groups of arguments: - * - common arguments; - * - arguments for any number of external tables each in form "--external args...", - * where possible args are file, name, format, structure, types; - * - param arguments for prepared statements. - * Split these groups before processing. - */ - using Arguments = std::vector; - - Arguments common_arguments{""}; /// 0th argument is ignored. - std::vector external_tables_arguments; - - bool in_external_group = false; - for (int arg_num = 1; arg_num < argc; ++arg_num) - { - const char * arg = argv[arg_num]; - - if (0 == strcmp(arg, "--external")) - { - in_external_group = true; - external_tables_arguments.emplace_back(Arguments{""}); - } - /// Options with value after equal sign. - else if ( - in_external_group - && (0 == strncmp(arg, "--file=", strlen("--file=")) || 0 == strncmp(arg, "--name=", strlen("--name=")) - || 0 == strncmp(arg, "--format=", strlen("--format=")) || 0 == strncmp(arg, "--structure=", strlen("--structure=")) - || 0 == strncmp(arg, "--types=", strlen("--types=")))) - { - external_tables_arguments.back().emplace_back(arg); - } - /// Options with value after whitespace. - else if ( - in_external_group - && (0 == strcmp(arg, "--file") || 0 == strcmp(arg, "--name") || 0 == strcmp(arg, "--format") - || 0 == strcmp(arg, "--structure") || 0 == strcmp(arg, "--types"))) - { - if (arg_num + 1 < argc) - { - external_tables_arguments.back().emplace_back(arg); - ++arg_num; - arg = argv[arg_num]; - external_tables_arguments.back().emplace_back(arg); - } - else - break; - } - else - { - in_external_group = false; - - /// Parameter arg after underline. - if (startsWith(arg, "--param_")) - { - const char * param_continuation = arg + strlen("--param_"); - const char * equal_pos = strchr(param_continuation, '='); - - if (equal_pos == param_continuation) - throw Exception("Parameter name cannot be empty", ErrorCodes::BAD_ARGUMENTS); - - if (equal_pos) - { - /// param_name=value - query_parameters.emplace(String(param_continuation, equal_pos), String(equal_pos + 1)); - } - else - { - /// param_name value - ++arg_num; - if (arg_num >= argc) - throw Exception("Parameter requires value", ErrorCodes::BAD_ARGUMENTS); - arg = argv[arg_num]; - query_parameters.emplace(String(param_continuation), String(arg)); - } - } - else - common_arguments.emplace_back(arg); - } - } - - stdin_is_a_tty = isatty(STDIN_FILENO); - stdout_is_a_tty = isatty(STDOUT_FILENO); - - uint64_t terminal_width = 0; - if (stdin_is_a_tty) - terminal_width = getTerminalWidth(); - - namespace po = boost::program_options; - - /// Main commandline options related to client functionality and all parameters from Settings. - po::options_description main_description = createOptionsDescription("Main options", terminal_width); - main_description.add_options() - ("help", "produce help message") - ("config-file,C", po::value(), "config-file path") - ("config,c", po::value(), "config-file path (another shorthand)") - ("host,h", po::value()->default_value("localhost"), "server host") - ("port", po::value()->default_value(9000), "server port") - ("secure,s", "Use TLS connection") - ("user,u", po::value()->default_value("default"), "user") - /** If "--password [value]" is used but the value is omitted, the bad argument exception will be thrown. - * implicit_value is used to avoid this exception (to allow user to type just "--password") - * Since currently boost provides no way to check if a value has been set implicitly for an option, - * the "\n" is used to distinguish this case because there is hardly a chance a user would use "\n" - * as the password. - */ - ("password", po::value()->implicit_value("\n", ""), "password") - ("ask-password", "ask-password") - ("quota_key", po::value(), "A string to differentiate quotas when the user have keyed quotas configured on server") - ("stage", po::value()->default_value("complete"), "Request query processing up to specified stage: complete,fetch_columns,with_mergeable_state,with_mergeable_state_after_aggregation,with_mergeable_state_after_aggregation_and_limit") - ("query_id", po::value(), "query_id") - ("query,q", po::value(), "query") - ("database,d", po::value(), "database") - ("pager", po::value(), "pager") - ("disable_suggestion,A", "Disable loading suggestion data. Note that suggestion data is loaded asynchronously through a second connection to ClickHouse server. Also it is reasonable to disable suggestion if you want to paste a query with TAB characters. Shorthand option -A is for those who get used to mysql client.") - ("suggestion_limit", po::value()->default_value(10000), - "Suggestion limit for how many databases, tables and columns to fetch.") - ("multiline,m", "multiline") - ("multiquery,n", "multiquery") - ("queries-file", po::value>()->multitoken(), - "file path with queries to execute; multiple files can be specified (--queries-file file1 file2...)") - ("format,f", po::value(), "default output format") - ("testmode,T", "enable test hints in comments") - ("ignore-error", "do not stop processing in multiquery mode") - ("vertical,E", "vertical output format, same as --format=Vertical or FORMAT Vertical or \\G at end of command") - ("time,t", "print query execution time to stderr in non-interactive mode (for benchmarks)") - ("stacktrace", "print stack traces of exceptions") - ("progress", "print progress even in non-interactive mode") - ("version,V", "print version information and exit") - ("version-clean", "print version in machine-readable format and exit") - ("echo", "in batch mode, print query before execution") - ("max_client_network_bandwidth", po::value(), "the maximum speed of data exchange over the network for the client in bytes per second.") - ("compression", po::value(), "enable or disable compression") - ("highlight", po::value()->default_value(true), "enable or disable basic syntax highlight in interactive command line") - ("log-level", po::value(), "client log level") - ("server_logs_file", po::value(), "put server logs into specified file") - ("query-fuzzer-runs", po::value()->default_value(0), "After executing every SELECT query, do random mutations in it and run again specified number of times. This is used for testing to discover unexpected corner cases.") - ("interleave-queries-file", po::value>()->multitoken(), - "file path with queries to execute before every file from 'queries-file'; multiple files can be specified (--queries-file file1 file2...); this is needed to enable more aggressive fuzzing of newly added tests (see 'query-fuzzer-runs' option)") - ("opentelemetry-traceparent", po::value(), "OpenTelemetry traceparent header as described by W3C Trace Context recommendation") - ("opentelemetry-tracestate", po::value(), "OpenTelemetry tracestate header as described by W3C Trace Context recommendation") - ("history_file", po::value(), "path to history file") - ("no-warnings", "disable warnings when client connects to server") - ("max_memory_usage_in_client", po::value(), "sets memory limit in client") - ; - - Settings cmd_settings; - cmd_settings.addProgramOptions(main_description); - - /// Commandline options related to external tables. - po::options_description external_description = createOptionsDescription("External tables options", terminal_width); - external_description.add_options()("file", po::value(), "data file or - for stdin")( - "name", - po::value()->default_value("_data"), - "name of the table")("format", po::value()->default_value("TabSeparated"), "data format")("structure", po::value(), "structure")("types", po::value(), "types"); - - /// Parse main commandline options. - po::parsed_options parsed = po::command_line_parser(common_arguments).options(main_description).run(); - auto unrecognized_options = po::collect_unrecognized(parsed.options, po::collect_unrecognized_mode::include_positional); - // unrecognized_options[0] is "", I don't understand why we need "" as the first argument which unused - if (unrecognized_options.size() > 1) - { - throw Exception("Unrecognized option '" + unrecognized_options[1] + "'", ErrorCodes::UNRECOGNIZED_ARGUMENTS); - } - po::variables_map options; - po::store(parsed, options); - po::notify(options); - - if (options.count("version") || options.count("V")) - { - showClientVersion(); - exit(0); - } - - if (options.count("version-clean")) - { - std::cout << VERSION_STRING; - exit(0); - } - - /// Output of help message. - if (options.count("help") - || (options.count("host") && options["host"].as() == "elp")) /// If user writes -help instead of --help. - { - std::cout << main_description << "\n"; - std::cout << external_description << "\n"; - std::cout << "In addition, --param_name=value can be specified for substitution of parameters for parametrized queries.\n"; - exit(0); - } - - if (options.count("log-level")) - Poco::Logger::root().setLevel(options["log-level"].as()); - - size_t number_of_external_tables_with_stdin_source = 0; - for (size_t i = 0; i < external_tables_arguments.size(); ++i) - { - /// Parse commandline options related to external tables. - po::parsed_options parsed_tables = po::command_line_parser(external_tables_arguments[i]).options(external_description).run(); - po::variables_map external_options; - po::store(parsed_tables, external_options); - - try - { - external_tables.emplace_back(external_options); - if (external_tables.back().file == "-") - ++number_of_external_tables_with_stdin_source; - if (number_of_external_tables_with_stdin_source > 1) - throw Exception("Two or more external tables has stdin (-) set as --file field", ErrorCodes::BAD_ARGUMENTS); - } - catch (const Exception & e) - { - std::cerr << getExceptionMessage(e, false) << std::endl; - std::cerr << "Table №" << i << std::endl << std::endl; - /// Avoid the case when error exit code can possibly overflow to normal (zero). - auto exit_code = e.code() % 256; - if (exit_code == 0) - exit_code = 255; - exit(exit_code); - } - } - - context->makeGlobalContext(); - context->setSettings(cmd_settings); - - /// Copy settings-related program options to config. - /// TODO: Is this code necessary? - for (const auto & setting : context->getSettingsRef().all()) - { - const auto & name = setting.getName(); - if (options.count(name)) - config().setString(name, options[name].as()); - } - - if (options.count("config-file") && options.count("config")) - throw Exception("Two or more configuration files referenced in arguments", ErrorCodes::BAD_ARGUMENTS); - - query_processing_stage = QueryProcessingStage::fromString(options["stage"].as()); - - /// Save received data into the internal config. - if (options.count("config-file")) - config().setString("config-file", options["config-file"].as()); - if (options.count("config")) - config().setString("config-file", options["config"].as()); - if (options.count("host") && !options["host"].defaulted()) - config().setString("host", options["host"].as()); - if (options.count("query_id")) - config().setString("query_id", options["query_id"].as()); - if (options.count("query")) - config().setString("query", options["query"].as()); - if (options.count("queries-file")) - queries_files = options["queries-file"].as>(); - if (options.count("interleave-queries-file")) - interleave_queries_files = options["interleave-queries-file"].as>(); - if (options.count("database")) - config().setString("database", options["database"].as()); - if (options.count("pager")) - config().setString("pager", options["pager"].as()); - if (options.count("port") && !options["port"].defaulted()) - config().setInt("port", options["port"].as()); - if (options.count("secure")) - config().setBool("secure", true); - if (options.count("user") && !options["user"].defaulted()) - config().setString("user", options["user"].as()); - if (options.count("password")) - config().setString("password", options["password"].as()); - if (options.count("ask-password")) - config().setBool("ask-password", true); - if (options.count("quota_key")) - config().setString("quota_key", options["quota_key"].as()); - if (options.count("multiline")) - config().setBool("multiline", true); - if (options.count("multiquery")) - config().setBool("multiquery", true); - if (options.count("testmode")) - config().setBool("testmode", true); - if (options.count("ignore-error")) - config().setBool("ignore-error", true); - if (options.count("format")) - config().setString("format", options["format"].as()); - if (options.count("vertical")) - config().setBool("vertical", true); - if (options.count("stacktrace")) - config().setBool("stacktrace", true); - if (options.count("progress")) - config().setBool("progress", true); - if (options.count("echo")) - config().setBool("echo", true); - if (options.count("time")) - print_time_to_stderr = true; - if (options.count("max_client_network_bandwidth")) - max_client_network_bandwidth = options["max_client_network_bandwidth"].as(); - if (options.count("compression")) - config().setBool("compression", options["compression"].as()); - if (options.count("server_logs_file")) - server_logs_file = options["server_logs_file"].as(); - if (options.count("disable_suggestion")) - config().setBool("disable_suggestion", true); - if (options.count("suggestion_limit")) - config().setInt("suggestion_limit", options["suggestion_limit"].as()); - if (options.count("highlight")) - config().setBool("highlight", options["highlight"].as()); - if (options.count("history_file")) - config().setString("history_file", options["history_file"].as()); - if (options.count("no-warnings")) - config().setBool("no-warnings", true); - - if ((query_fuzzer_runs = options["query-fuzzer-runs"].as())) - { - // Fuzzer implies multiquery. - config().setBool("multiquery", true); - - // Ignore errors in parsing queries. - config().setBool("ignore-error", true); - ignore_error = true; - } - - if (options.count("opentelemetry-traceparent")) - { - std::string traceparent = options["opentelemetry-traceparent"].as(); - std::string error; - if (!context->getClientInfo().client_trace_context.parseTraceparentHeader(traceparent, error)) - { - throw Exception(ErrorCodes::BAD_ARGUMENTS, "Cannot parse OpenTelemetry traceparent '{}': {}", traceparent, error); - } - } - - if (options.count("opentelemetry-tracestate")) - { - context->getClientInfo().client_trace_context.tracestate = options["opentelemetry-tracestate"].as(); - } - - argsToConfig(common_arguments, config(), 100); - - clearPasswordFromCommandLine(argc, argv); - } -}; + return true; } + +void Client::printHelpMessage(const OptionsDescription & options_description) +{ + std::cout << options_description.main_description.value() << "\n"; + std::cout << options_description.external_description.value() << "\n"; + std::cout << "In addition, --param_name=value can be specified for substitution of parameters for parametrized queries.\n"; +} + + +void Client::addAndCheckOptions(OptionsDescription & options_description, po::variables_map & options, Arguments & arguments) +{ + /// Main commandline options related to client functionality and all parameters from Settings. + options_description.main_description->add_options() + ("config,c", po::value(), "config-file path (another shorthand)") + ("host,h", po::value()->default_value("localhost"), "server host") + ("port", po::value()->default_value(9000), "server port") + ("secure,s", "Use TLS connection") + ("user,u", po::value()->default_value("default"), "user") + /** If "--password [value]" is used but the value is omitted, the bad argument exception will be thrown. + * implicit_value is used to avoid this exception (to allow user to type just "--password") + * Since currently boost provides no way to check if a value has been set implicitly for an option, + * the "\n" is used to distinguish this case because there is hardly a chance a user would use "\n" + * as the password. + */ + ("password", po::value()->implicit_value("\n", ""), "password") + ("ask-password", "ask-password") + ("quota_key", po::value(), "A string to differentiate quotas when the user have keyed quotas configured on server") + ("pager", po::value(), "pager") + ("testmode,T", "enable test hints in comments") + + ("max_client_network_bandwidth", po::value(), "the maximum speed of data exchange over the network for the client in bytes per second.") + ("compression", po::value(), "enable or disable compression") + + ("log-level", po::value(), "client log level") + ("server_logs_file", po::value(), "put server logs into specified file") + + ("query-fuzzer-runs", po::value()->default_value(0), "After executing every SELECT query, do random mutations in it and run again specified number of times. This is used for testing to discover unexpected corner cases.") + ("interleave-queries-file", po::value>()->multitoken(), + "file path with queries to execute before every file from 'queries-file'; multiple files can be specified (--queries-file file1 file2...); this is needed to enable more aggressive fuzzing of newly added tests (see 'query-fuzzer-runs' option)") + + ("opentelemetry-traceparent", po::value(), "OpenTelemetry traceparent header as described by W3C Trace Context recommendation") + ("opentelemetry-tracestate", po::value(), "OpenTelemetry tracestate header as described by W3C Trace Context recommendation") + + ("no-warnings", "disable warnings when client connects to server") + ("max_memory_usage_in_client", po::value(), "sets memory limit in client") + ; + + /// Commandline options related to external tables. + + options_description.external_description.emplace(createOptionsDescription("External tables options", terminal_width)); + options_description.external_description->add_options() + ( + "file", po::value(), "data file or - for stdin" + ) + ( + "name", po::value()->default_value("_data"), "name of the table" + ) + ( + "format", po::value()->default_value("TabSeparated"), "data format" + ) + ( + "structure", po::value(), "structure" + ) + ( + "types", po::value(), "types" + ); + + cmd_settings.addProgramOptions(options_description.main_description.value()); + /// Parse main commandline options. + po::parsed_options parsed = po::command_line_parser(arguments).options(options_description.main_description.value()).run(); + auto unrecognized_options = po::collect_unrecognized(parsed.options, po::collect_unrecognized_mode::include_positional); + if (unrecognized_options.size() > 1) + throw Exception(ErrorCodes::UNRECOGNIZED_ARGUMENTS, "Unrecognized option '{}'", unrecognized_options[1]); + po::store(parsed, options); +} + + +void Client::processOptions(const OptionsDescription & options_description, + const CommandLineOptions & options, + const std::vector & external_tables_arguments) +{ + namespace po = boost::program_options; + + size_t number_of_external_tables_with_stdin_source = 0; + for (size_t i = 0; i < external_tables_arguments.size(); ++i) + { + /// Parse commandline options related to external tables. + po::parsed_options parsed_tables = po::command_line_parser(external_tables_arguments[i]).options( + options_description.external_description.value()).run(); + po::variables_map external_options; + po::store(parsed_tables, external_options); + + try + { + external_tables.emplace_back(external_options); + if (external_tables.back().file == "-") + ++number_of_external_tables_with_stdin_source; + if (number_of_external_tables_with_stdin_source > 1) + throw Exception("Two or more external tables has stdin (-) set as --file field", ErrorCodes::BAD_ARGUMENTS); + } + catch (const Exception & e) + { + std::cerr << getExceptionMessage(e, false) << std::endl; + std::cerr << "Table №" << i << std::endl << std::endl; + /// Avoid the case when error exit code can possibly overflow to normal (zero). + auto exit_code = e.code() % 256; + if (exit_code == 0) + exit_code = 255; + exit(exit_code); + } + } + send_external_tables = true; + + shared_context = Context::createShared(); + global_context = Context::createGlobal(shared_context.get()); + + global_context->makeGlobalContext(); + global_context->setApplicationType(Context::ApplicationType::CLIENT); + + global_context->setSettings(cmd_settings); + + /// Copy settings-related program options to config. + /// TODO: Is this code necessary? + for (const auto & setting : global_context->getSettingsRef().all()) + { + const auto & name = setting.getName(); + if (options.count(name)) + config().setString(name, options[name].as()); + } + + if (options.count("config-file") && options.count("config")) + throw Exception("Two or more configuration files referenced in arguments", ErrorCodes::BAD_ARGUMENTS); + + query_processing_stage = QueryProcessingStage::fromString(options["stage"].as()); + + if (options.count("config")) + config().setString("config-file", options["config"].as()); + if (options.count("host") && !options["host"].defaulted()) + config().setString("host", options["host"].as()); + if (options.count("interleave-queries-file")) + interleave_queries_files = options["interleave-queries-file"].as>(); + if (options.count("pager")) + config().setString("pager", options["pager"].as()); + if (options.count("port") && !options["port"].defaulted()) + config().setInt("port", options["port"].as()); + if (options.count("secure")) + config().setBool("secure", true); + if (options.count("user") && !options["user"].defaulted()) + config().setString("user", options["user"].as()); + if (options.count("password")) + config().setString("password", options["password"].as()); + if (options.count("ask-password")) + config().setBool("ask-password", true); + if (options.count("quota_key")) + config().setString("quota_key", options["quota_key"].as()); + if (options.count("testmode")) + config().setBool("testmode", true); + if (options.count("max_client_network_bandwidth")) + max_client_network_bandwidth = options["max_client_network_bandwidth"].as(); + if (options.count("compression")) + config().setBool("compression", options["compression"].as()); + if (options.count("server_logs_file")) + server_logs_file = options["server_logs_file"].as(); + if (options.count("no-warnings")) + config().setBool("no-warnings", true); + + if ((query_fuzzer_runs = options["query-fuzzer-runs"].as())) + { + // Fuzzer implies multiquery. + config().setBool("multiquery", true); + // Ignore errors in parsing queries. + config().setBool("ignore-error", true); + ignore_error = true; + } + + if (options.count("opentelemetry-traceparent")) + { + String traceparent = options["opentelemetry-traceparent"].as(); + String error; + if (!global_context->getClientInfo().client_trace_context.parseTraceparentHeader(traceparent, error)) + throw Exception(ErrorCodes::BAD_ARGUMENTS, "Cannot parse OpenTelemetry traceparent '{}': {}", traceparent, error); + } + + if (options.count("opentelemetry-tracestate")) + global_context->getClientInfo().client_trace_context.tracestate = options["opentelemetry-tracestate"].as(); +} + + +void Client::processConfig() +{ + /// Batch mode is enabled if one of the following is true: + /// - -e (--query) command line option is present. + /// The value of the option is used as the text of query (or of multiple queries). + /// If stdin is not a terminal, INSERT data for the first query is read from it. + /// - stdin is not a terminal. In this case queries are read from it. + /// - -qf (--queries-file) command line option is present. + /// The value of the option is used as file with query (or of multiple queries) to execute. + if (stdin_is_a_tty && !config().has("query") && queries_files.empty()) + { + if (config().has("query") && config().has("queries-file")) + throw Exception("Specify either `query` or `queries-file` option", ErrorCodes::BAD_ARGUMENTS); + + is_interactive = true; + } + else + { + need_render_progress = config().getBool("progress", false); + echo_queries = config().getBool("echo", false); + ignore_error = config().getBool("ignore-error", false); + + auto query_id = config().getString("query_id", ""); + if (!query_id.empty()) + global_context->setCurrentQueryId(query_id); + } + + if (config().has("multiquery")) + is_multiquery = true; + + is_default_format = !config().has("vertical") && !config().has("format"); + if (config().has("vertical")) + format = config().getString("format", "Vertical"); + else + format = config().getString("format", is_interactive ? "PrettyCompact" : "TabSeparated"); + + format_max_block_size = config().getInt("format_max_block_size", global_context->getSettingsRef().max_block_size); + + insert_format = "Values"; + + /// Setting value from cmd arg overrides one from config + if (global_context->getSettingsRef().max_insert_block_size.changed) + insert_format_max_block_size = global_context->getSettingsRef().max_insert_block_size; + else + insert_format_max_block_size = config().getInt("insert_format_max_block_size", global_context->getSettingsRef().max_insert_block_size); + + ClientInfo & client_info = global_context->getClientInfo(); + client_info.setInitialQuery(); + client_info.quota_key = config().getString("quota_key", ""); +} + +} + + #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wmissing-declarations" diff --git a/programs/client/Client.h b/programs/client/Client.h new file mode 100644 index 00000000000..43f6deae0b5 --- /dev/null +++ b/programs/client/Client.h @@ -0,0 +1,36 @@ +#pragma once + +#include + + +namespace DB +{ + +class Client : public ClientBase +{ +public: + Client() = default; + + void initialize(Poco::Util::Application & self) override; + + int main(const std::vector & /*args*/) override; + +protected: + bool executeMultiQuery(const String & all_queries_text) override; + bool processWithFuzzing(const String & full_query) override; + + void connect() override; + void processError(const String & query) const override; + String getName() const override { return "client"; } + + void printHelpMessage(const OptionsDescription & options_description) override; + void addAndCheckOptions(OptionsDescription & options_description, po::variables_map & options, Arguments & arguments) override; + void processOptions(const OptionsDescription & options_description, const CommandLineOptions & options, + const std::vector & external_tables_arguments) override; + void processConfig() override; + +private: + void printChangedSettings() const; + std::vector loadWarningMessages(); +}; +} diff --git a/programs/client/TestTags.cpp b/programs/client/TestTags.cpp new file mode 100644 index 00000000000..f3cb49cdabd --- /dev/null +++ b/programs/client/TestTags.cpp @@ -0,0 +1,51 @@ +#include "TestTags.h" + +#include + +namespace DB +{ + +size_t getTestTagsLength(const String & multiline_query) +{ + const String & text = multiline_query; + size_t pos = 0; + bool first_line = true; + + while (true) + { + size_t line_start = pos; + + /// Skip spaces. + while ((pos != text.length()) && (text[pos] == ' ' || text[pos] == '\t')) + ++pos; + + /// Skip comment "--". + static constexpr const char comment[] = "--"; + if (text.compare(pos, strlen(comment), comment) != 0) + return line_start; + pos += strlen(comment); + + /// Skip the prefix "Tags:" if it's the first line. + if (first_line) + { + while ((pos != text.length()) && (text[pos] == ' ' || text[pos] == '\t')) + ++pos; + + static constexpr const char tags_prefix[] = "Tags:"; + if (text.compare(pos, strlen(tags_prefix), tags_prefix) != 0) + return 0; + pos += strlen(tags_prefix); + first_line = false; + } + + /// Skip end-of-line. + size_t eol_pos = text.find_first_of("\r\n", pos); + if (eol_pos == String::npos) + return text.length(); + bool two_chars_eol = (eol_pos + 1 < text.length()) && ((text[eol_pos + 1] == '\r') || (text[eol_pos + 1] == '\n')) && (text[eol_pos + 1] != text[eol_pos]); + size_t eol_length = two_chars_eol ? 2 : 1; + pos = eol_pos + eol_length; + } +} + +} diff --git a/programs/client/TestTags.h b/programs/client/TestTags.h new file mode 100644 index 00000000000..e2e36698cb5 --- /dev/null +++ b/programs/client/TestTags.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +namespace DB +{ + +/// Returns the length of a text looking like +/// -- Tags: x, y, z +/// -- Tag x: explanation of tag x +/// -- Tag y: explanation of tag y +/// -- Tag z: explanation of tag z +/// +/// at the beginning of a multiline query. +/// If there are no test tags in the multiline query the function returns 0. +size_t getTestTagsLength(const String & multiline_query); + +} diff --git a/programs/config_tools.h.in b/programs/config_tools.h.in index 62fc076861c..b97eb63b535 100644 --- a/programs/config_tools.h.in +++ b/programs/config_tools.h.in @@ -18,3 +18,4 @@ #cmakedefine01 ENABLE_CLICKHOUSE_LIBRARY_BRIDGE #cmakedefine01 ENABLE_CLICKHOUSE_KEEPER #cmakedefine01 ENABLE_CLICKHOUSE_KEEPER_CONVERTER +#cmakedefine01 ENABLE_CLICKHOUSE_STATIC_FILES_DISK_UPLOADER diff --git a/programs/copier/ClusterCopier.cpp b/programs/copier/ClusterCopier.cpp index cf0b6cc76a4..30b99b69351 100644 --- a/programs/copier/ClusterCopier.cpp +++ b/programs/copier/ClusterCopier.cpp @@ -9,6 +9,11 @@ #include #include #include +#include +#include +#include +#include +#include #include namespace DB @@ -1274,13 +1279,14 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl( auto get_select_query = [&] (const DatabaseAndTableName & from_table, const String & fields, bool enable_splitting, String limit = "") { String query; + query += "WITH " + task_partition.name + " AS partition_key "; query += "SELECT " + fields + " FROM " + getQuotedTable(from_table); if (enable_splitting && experimental_use_sample_offset) query += " SAMPLE 1/" + toString(number_of_splits) + " OFFSET " + toString(current_piece_number) + "/" + toString(number_of_splits); /// TODO: Bad, it is better to rewrite with ASTLiteral(partition_key_field) - query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) + " = (" + task_partition.name + " AS partition_key))"; + query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) + " = partition_key)"; if (enable_splitting && !experimental_use_sample_offset) query += " AND ( cityHash64(" + primary_key_comma_separated + ") %" + toString(number_of_splits) + " = " + toString(current_piece_number) + " )"; @@ -1445,7 +1451,7 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl( local_context->setSettings(task_cluster->settings_pull); local_context->setSetting("skip_unavailable_shards", true); - Block block = getBlockWithAllStreamData(InterpreterFactory::get(query_select_ast, local_context)->execute().getInputStream()); + Block block = getBlockWithAllStreamData(InterpreterFactory::get(query_select_ast, local_context)->execute().pipeline); count = (block) ? block.safeGetByPosition(0).column->getUInt(0) : 0; } @@ -1523,25 +1529,30 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl( context_insert->setSettings(task_cluster->settings_push); /// Custom INSERT SELECT implementation - BlockInputStreamPtr input; - BlockOutputStreamPtr output; + QueryPipeline input; + QueryPipeline output; { BlockIO io_select = InterpreterFactory::get(query_select_ast, context_select)->execute(); BlockIO io_insert = InterpreterFactory::get(query_insert_ast, context_insert)->execute(); - auto pure_input = io_select.getInputStream(); - output = io_insert.out; + output = std::move(io_insert.pipeline); /// Add converting actions to make it possible to copy blocks with slightly different schema - const auto & select_block = pure_input->getHeader(); - const auto & insert_block = output->getHeader(); + const auto & select_block = io_select.pipeline.getHeader(); + const auto & insert_block = output.getHeader(); auto actions_dag = ActionsDAG::makeConvertingActions( select_block.getColumnsWithTypeAndName(), insert_block.getColumnsWithTypeAndName(), ActionsDAG::MatchColumnsMode::Position); auto actions = std::make_shared(actions_dag, ExpressionActionsSettings::fromContext(getContext())); - input = std::make_shared(pure_input, actions); + QueryPipelineBuilder builder; + builder.init(std::move(io_select.pipeline)); + builder.addSimpleTransform([&](const Block & header) + { + return std::make_shared(header, actions); + }); + input = QueryPipelineBuilder::getPipeline(std::move(builder)); } /// Fail-fast optimization to abort copying when the current clean state expires @@ -1587,7 +1598,26 @@ TaskStatus ClusterCopier::processPartitionPieceTaskImpl( }; /// Main work is here - copyData(*input, *output, cancel_check, update_stats); + PullingPipelineExecutor pulling_executor(input); + PushingPipelineExecutor pushing_executor(output); + + Block data; + bool is_cancelled = false; + while (pulling_executor.pull(data)) + { + if (cancel_check()) + { + is_cancelled = true; + pushing_executor.cancel(); + pushing_executor.cancel(); + break; + } + pushing_executor.push(data); + update_stats(data); + } + + if (!is_cancelled) + pushing_executor.finish(); // Just in case if (future_is_dirty_checker.valid()) @@ -1710,7 +1740,8 @@ String ClusterCopier::getRemoteCreateTable( String query = "SHOW CREATE TABLE " + getQuotedTable(table); Block block = getBlockWithAllStreamData( - std::make_shared(connection, query, InterpreterShowCreateQuery::getSampleBlock(), remote_context)); + QueryPipeline(std::make_shared( + std::make_shared(connection, query, InterpreterShowCreateQuery::getSampleBlock(), remote_context), false, false))); return typeid_cast(*block.safeGetByPosition(0).column).getDataAt(0).toString(); } @@ -1823,7 +1854,7 @@ std::set ClusterCopier::getShardPartitions(const ConnectionTimeouts & ti auto local_context = Context::createCopy(context); local_context->setSettings(task_cluster->settings_pull); - Block block = getBlockWithAllStreamData(InterpreterFactory::get(query_ast, local_context)->execute().getInputStream()); + Block block = getBlockWithAllStreamData(InterpreterFactory::get(query_ast, local_context)->execute().pipeline); if (block) { @@ -1851,9 +1882,9 @@ bool ClusterCopier::checkShardHasPartition(const ConnectionTimeouts & timeouts, TaskTable & task_table = task_shard.task_table; WriteBufferFromOwnString ss; + ss << "WITH " + partition_quoted_name + " AS partition_key "; ss << "SELECT 1 FROM " << getQuotedTable(task_shard.table_read_shard); - ss << " WHERE (" << queryToString(task_table.engine_push_partition_key_ast); - ss << " = (" + partition_quoted_name << " AS partition_key))"; + ss << " WHERE (" << queryToString(task_table.engine_push_partition_key_ast) << " = partition_key)"; if (!task_table.where_condition_str.empty()) ss << " AND (" << task_table.where_condition_str << ")"; ss << " LIMIT 1"; @@ -1868,7 +1899,11 @@ bool ClusterCopier::checkShardHasPartition(const ConnectionTimeouts & timeouts, auto local_context = Context::createCopy(context); local_context->setSettings(task_cluster->settings_pull); - return InterpreterFactory::get(query_ast, local_context)->execute().getInputStream()->read().rows() != 0; + auto pipeline = InterpreterFactory::get(query_ast, local_context)->execute().pipeline; + PullingPipelineExecutor executor(pipeline); + Block block; + executor.pull(block); + return block.rows() != 0; } bool ClusterCopier::checkPresentPartitionPiecesOnCurrentShard(const ConnectionTimeouts & timeouts, @@ -1882,13 +1917,15 @@ bool ClusterCopier::checkPresentPartitionPiecesOnCurrentShard(const ConnectionTi UNUSED(primary_key_comma_separated); - std::string query = "SELECT 1 FROM " + getQuotedTable(task_shard.table_read_shard); + std::string query; + + query += "WITH " + partition_quoted_name + " AS partition_key "; + query += "SELECT 1 FROM " + getQuotedTable(task_shard.table_read_shard); if (experimental_use_sample_offset) query += " SAMPLE 1/" + toString(number_of_splits) + " OFFSET " + toString(current_piece_number) + "/" + toString(number_of_splits); - query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) - + " = (" + partition_quoted_name + " AS partition_key))"; + query += " WHERE (" + queryToString(task_table.engine_push_partition_key_ast) + " = partition_key)"; if (!experimental_use_sample_offset) query += " AND (cityHash64(" + primary_key_comma_separated + ") % " @@ -1907,12 +1944,15 @@ bool ClusterCopier::checkPresentPartitionPiecesOnCurrentShard(const ConnectionTi auto local_context = Context::createCopy(context); local_context->setSettings(task_cluster->settings_pull); - auto result = InterpreterFactory::get(query_ast, local_context)->execute().getInputStream()->read().rows(); - if (result != 0) + auto pipeline = InterpreterFactory::get(query_ast, local_context)->execute().pipeline; + PullingPipelineExecutor executor(pipeline); + Block result; + executor.pull(result); + if (result.rows() != 0) LOG_INFO(log, "Partition {} piece number {} is PRESENT on shard {}", partition_quoted_name, std::to_string(current_piece_number), task_shard.getDescription()); else LOG_INFO(log, "Partition {} piece number {} is ABSENT on shard {}", partition_quoted_name, std::to_string(current_piece_number), task_shard.getDescription()); - return result != 0; + return result.rows() != 0; } @@ -1961,7 +2001,7 @@ UInt64 ClusterCopier::executeQueryOnCluster( } catch (...) { - LOG_WARNING(log, "Seemns like node with address {} is unreachable.", node.host_name); + LOG_WARNING(log, "Node with address {} seems to be unreachable.", node.host_name); continue; } diff --git a/programs/copier/ClusterCopierApp.cpp b/programs/copier/ClusterCopierApp.cpp index 69f2fd3383c..b8714d0851d 100644 --- a/programs/copier/ClusterCopierApp.cpp +++ b/programs/copier/ClusterCopierApp.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/programs/copier/Internals.cpp b/programs/copier/Internals.cpp index bec612a8226..c5e702cd1dc 100644 --- a/programs/copier/Internals.cpp +++ b/programs/copier/Internals.cpp @@ -1,6 +1,8 @@ #include "Internals.h" #include #include +#include +#include namespace DB { @@ -63,9 +65,21 @@ BlockInputStreamPtr squashStreamIntoOneBlock(const BlockInputStreamPtr & stream) std::numeric_limits::max()); } -Block getBlockWithAllStreamData(const BlockInputStreamPtr & stream) +Block getBlockWithAllStreamData(QueryPipeline pipeline) { - return squashStreamIntoOneBlock(stream)->read(); + QueryPipelineBuilder builder; + builder.init(std::move(pipeline)); + builder.addTransform(std::make_shared( + builder.getHeader(), + std::numeric_limits::max(), + std::numeric_limits::max())); + + auto cur_pipeline = QueryPipelineBuilder::getPipeline(std::move(builder)); + Block block; + PullingPipelineExecutor executor(cur_pipeline); + executor.pull(block); + + return block; } diff --git a/programs/copier/Internals.h b/programs/copier/Internals.h index 9e40d7ebd7b..e04258aaf32 100644 --- a/programs/copier/Internals.h +++ b/programs/copier/Internals.h @@ -13,12 +13,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -165,10 +165,7 @@ std::shared_ptr createASTStorageDistributed( const String & cluster_name, const String & database, const String & table, const ASTPtr & sharding_key_ast = nullptr); - -BlockInputStreamPtr squashStreamIntoOneBlock(const BlockInputStreamPtr & stream); - -Block getBlockWithAllStreamData(const BlockInputStreamPtr & stream); +Block getBlockWithAllStreamData(QueryPipeline pipeline); bool isExtendedDefinitionStorage(const ASTPtr & storage_ast); diff --git a/programs/copier/TaskTableAndShard.h b/programs/copier/TaskTableAndShard.h index 35170c134ff..16696a1bd23 100644 --- a/programs/copier/TaskTableAndShard.h +++ b/programs/copier/TaskTableAndShard.h @@ -6,7 +6,7 @@ #include -#include +#include #include diff --git a/programs/format/Format.cpp b/programs/format/Format.cpp index 5bf19191353..984543a6c6b 100644 --- a/programs/format/Format.cpp +++ b/programs/format/Format.cpp @@ -44,6 +44,7 @@ int mainEntryClickHouseFormat(int argc, char ** argv) boost::program_options::options_description desc = createOptionsDescription("Allowed options", getTerminalWidth()); desc.add_options() + ("query", po::value(), "query to format") ("help,h", "produce help message") ("hilite", "add syntax highlight with ANSI terminal escape sequences") ("oneline", "format in single line") @@ -86,8 +87,16 @@ int mainEntryClickHouseFormat(int argc, char ** argv) } String query; - ReadBufferFromFileDescriptor in(STDIN_FILENO); - readStringUntilEOF(query, in); + + if (options.count("query")) + { + query = options["query"].as(); + } + else + { + ReadBufferFromFileDescriptor in(STDIN_FILENO); + readStringUntilEOF(query, in); + } if (obfuscate) { @@ -101,10 +110,6 @@ int mainEntryClickHouseFormat(int argc, char ** argv) hash_func.update(options["seed"].as()); } - SharedContextHolder shared_context = Context::createShared(); - auto context = Context::createGlobal(shared_context.get()); - context->makeGlobalContext(); - registerFunctions(); registerAggregateFunctions(); registerTableFunctions(); @@ -122,7 +127,7 @@ int mainEntryClickHouseFormat(int argc, char ** argv) { std::string what(name); - return FunctionFactory::instance().tryGet(what, context) != nullptr + return FunctionFactory::instance().has(what) || AggregateFunctionFactory::instance().isAggregateFunctionName(what) || TableFunctionFactory::instance().isTableFunctionName(what) || additional_names.count(what); diff --git a/programs/git-import/git-import.cpp b/programs/git-import/git-import.cpp index 7977cfba79d..749dcbfee5f 100644 --- a/programs/git-import/git-import.cpp +++ b/programs/git-import/git-import.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include diff --git a/programs/install/Install.cpp b/programs/install/Install.cpp index 8013b6cf991..e001d0ceb53 100644 --- a/programs/install/Install.cpp +++ b/programs/install/Install.cpp @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -962,7 +962,7 @@ namespace if (isRunning(pid_file)) { throw Exception(ErrorCodes::CANNOT_KILL, - "The server process still exists after %zu ms", + "The server process still exists after {} tries (delay: {} ms)", num_kill_check_tries, kill_check_delay_ms); } } diff --git a/programs/keeper-converter/KeeperConverter.cpp b/programs/keeper-converter/KeeperConverter.cpp index 15dbc8bd220..fcf117a4cff 100644 --- a/programs/keeper-converter/KeeperConverter.cpp +++ b/programs/keeper-converter/KeeperConverter.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include int mainEntryClickHouseKeeperConverter(int argc, char ** argv) diff --git a/programs/keeper/Keeper.cpp b/programs/keeper/Keeper.cpp index 4d01a523853..a8dff091858 100644 --- a/programs/keeper/Keeper.cpp +++ b/programs/keeper/Keeper.cpp @@ -9,10 +9,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -300,9 +300,9 @@ int Keeper::main(const std::vector & /*args*/) if (config().has("keeper_server.storage_path")) path = config().getString("keeper_server.storage_path"); else if (config().has("keeper_server.log_storage_path")) - path = config().getString("keeper_server.log_storage_path"); + path = std::filesystem::path(config().getString("keeper_server.log_storage_path")).parent_path(); else if (config().has("keeper_server.snapshot_storage_path")) - path = config().getString("keeper_server.snapshot_storage_path"); + path = std::filesystem::path(config().getString("keeper_server.snapshot_storage_path")).parent_path(); else path = std::filesystem::path{KEEPER_DEFAULT_PATH}; @@ -359,7 +359,7 @@ int Keeper::main(const std::vector & /*args*/) auto servers = std::make_shared>(); /// Initialize test keeper RAFT. Do nothing if no nu_keeper_server in config. - global_context->initializeKeeperStorageDispatcher(); + global_context->initializeKeeperDispatcher(); for (const auto & listen_host : listen_hosts) { /// TCP Keeper @@ -428,7 +428,7 @@ int Keeper::main(const std::vector & /*args*/) else LOG_INFO(log, "Closed connections to Keeper."); - global_context->shutdownKeeperStorageDispatcher(); + global_context->shutdownKeeperDispatcher(); /// Wait server pool to avoid use-after-free of destroyed context in the handlers server_pool.joinAll(); diff --git a/programs/keeper/keeper_config.xml b/programs/keeper/keeper_config.xml index ef218c9f2d7..02d5be70563 100644 --- a/programs/keeper/keeper_config.xml +++ b/programs/keeper/keeper_config.xml @@ -1,4 +1,4 @@ - + @@ -10,4 +10,4 @@ access/ - + diff --git a/programs/server/config.d/log_to_console.xml b/programs/server/config.d/log_to_console.xml index 227c53647f3..70d2f014380 100644 --- a/programs/server/config.d/log_to_console.xml +++ b/programs/server/config.d/log_to_console.xml @@ -1,7 +1,7 @@ - + true - + diff --git a/programs/server/config.d/more_clusters.xml b/programs/server/config.d/more_clusters.xml index aecbf9e0ba7..ce88408876f 100644 --- a/programs/server/config.d/more_clusters.xml +++ b/programs/server/config.d/more_clusters.xml @@ -1,4 +1,4 @@ - + - + diff --git a/programs/server/config.d/path.xml b/programs/server/config.d/path.xml index 466ed0d1663..46af5bfb64b 100644 --- a/programs/server/config.d/path.xml +++ b/programs/server/config.d/path.xml @@ -1,8 +1,8 @@ - + ./ ./tmp/ ./user_files/ ./format_schemas/ ./access/ ./top_level_domains/ - + diff --git a/programs/server/config.xml b/programs/server/config.xml index 510a5e230f8..f9a3a5030d9 100644 --- a/programs/server/config.xml +++ b/programs/server/config.xml @@ -5,7 +5,7 @@ You can either move the settings to the right place inside "users.xml" file or add 1 here. --> - + @@ -193,11 +194,11 @@ /path/to/ssl_ca_cert_file - deflate - medium @@ -330,7 +331,7 @@ 1000 - 1073741824 + 134217728 /var/lib/clickhouse/ @@ -585,7 +586,7 @@ --> @@ -717,13 +718,13 @@ toYYYYMM(event_date) + + system + session_log
+ + toYYYYMM(event_date) + 7500 +
@@ -990,10 +999,13 @@ *_dictionary.xml + + *_function.xml + @@ -1017,10 +1029,28 @@ defined, or encryption codecs will be disabled otherwise. The command is executed through /bin/sh and is expected to write a Base64-encoded key to the stdout. --> - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -1199,4 +1229,4 @@ --> -
+ diff --git a/programs/server/config.yaml.example b/programs/server/config.yaml.example index 5b2da1d3128..b2d016e06e5 100644 --- a/programs/server/config.yaml.example +++ b/programs/server/config.yaml.example @@ -1,6 +1,6 @@ # This is an example of a configuration file "config.xml" rewritten in YAML # You can read this documentation for detailed information about YAML configuration: -# https://clickhouse.tech/docs/en/operations/configuration-files/ +# https://clickhouse.com/docs/en/operations/configuration-files/ # NOTE: User and query level settings are set up in "users.yaml" file. # If you have accidentally specified user-level settings here, server won't start. @@ -280,7 +280,7 @@ mark_cache_size: 5368709120 mmap_cache_size: 1000 # Cache size for compiled expressions. -compiled_expression_cache_size: 1073741824 +compiled_expression_cache_size: 134217728 # Path to data directory, with trailing slash. path: /var/lib/clickhouse/ @@ -509,7 +509,7 @@ remap_executable: false # port: 9019 # Configuration of clusters that could be used in Distributed tables. -# https://clickhouse.tech/docs/en/operations/table_engines/distributed/ +# https://clickhouse.com/docs/en/operations/table_engines/distributed/ remote_servers: # Test only shard config for testing distributed storage test_shard_localhost: @@ -602,11 +602,11 @@ remote_servers: # If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file. # By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element. -# Values for substitutions are specified in /yandex/name_of_substitution elements in that file. +# Values for substitutions are specified in /clickhouse/name_of_substitution elements in that file. # ZooKeeper is used to store metadata about replicas, when using Replicated tables. # Optional. If you don't use replicated tables, you could omit that. -# See https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/replication/ +# See https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/replication/ # zookeeper: # - node: @@ -621,7 +621,7 @@ remote_servers: # Substitutions for parameters of replicated tables. # Optional. If you don't use replicated tables, you could omit that. -# See https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/replication/#creating-replicated-tables +# See https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/replication/#creating-replicated-tables # macros: # shard: 01 # replica: example01-01-1 @@ -693,7 +693,7 @@ query_log: database: system table: query_log - # PARTITION BY expr: https://clickhouse.yandex/docs/en/table_engines/mergetree-family/custom_partitioning_key/ + # PARTITION BY expr: https://clickhouse.com/docs/en/table_engines/mergetree-family/custom_partitioning_key/ # Example: # event_date # toMonday(event_date) @@ -701,7 +701,7 @@ query_log: # toStartOfHour(event_time) partition_by: toYYYYMM(event_date) - # Table TTL specification: https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/mergetree/#mergetree-table-ttl + # Table TTL specification: https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree/#mergetree-table-ttl # Example: # event_date + INTERVAL 1 WEEK # event_date + INTERVAL 7 DAY DELETE @@ -801,7 +801,7 @@ crash_log: flush_interval_milliseconds: 1000 # Parameters for embedded dictionaries, used in Yandex.Metrica. -# See https://clickhouse.yandex/docs/en/dicts/internal_dicts/ +# See https://clickhouse.com/docs/en/dicts/internal_dicts/ # Path to file with region hierarchy. # path_to_regions_hierarchy_file: /opt/geo/regions_hierarchy.txt @@ -821,7 +821,7 @@ top_level_domains_lists: '' # public_suffix_list: /path/to/public_suffix_list.dat # Configuration of external dictionaries. See: -# https://clickhouse.tech/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts +# https://clickhouse.com/docs/en/sql-reference/dictionaries/external-dictionaries/external-dicts dictionaries_config: '*_dictionary.xml' # Uncomment if you want data to be compressed 30-100% better. diff --git a/programs/server/embedded.xml b/programs/server/embedded.xml index a66f57d1eb7..ba0df99dfe0 100644 --- a/programs/server/embedded.xml +++ b/programs/server/embedded.xml @@ -1,6 +1,6 @@ - + trace true @@ -37,4 +37,4 @@ - + diff --git a/programs/server/users.d/allow_introspection_functions.xml b/programs/server/users.d/allow_introspection_functions.xml index b94e95bc043..cfde1b4525d 100644 --- a/programs/server/users.d/allow_introspection_functions.xml +++ b/programs/server/users.d/allow_introspection_functions.xml @@ -1,8 +1,8 @@ - + 1 - + diff --git a/programs/server/users.d/allow_only_from_localhost.xml b/programs/server/users.d/allow_only_from_localhost.xml index bce5858ad41..b1b38686133 100644 --- a/programs/server/users.d/allow_only_from_localhost.xml +++ b/programs/server/users.d/allow_only_from_localhost.xml @@ -1,5 +1,5 @@ - + @@ -8,4 +8,4 @@ - + diff --git a/programs/server/users.d/session_log_test.xml b/programs/server/users.d/session_log_test.xml new file mode 120000 index 00000000000..85377f51630 --- /dev/null +++ b/programs/server/users.d/session_log_test.xml @@ -0,0 +1 @@ +../../../tests/config/users.d/session_log_test.xml \ No newline at end of file diff --git a/programs/server/users.xml b/programs/server/users.xml index 5166b135e33..fd5fe414579 100644 --- a/programs/server/users.xml +++ b/programs/server/users.xml @@ -1,5 +1,5 @@ - + @@ -120,4 +120,4 @@ - + diff --git a/programs/server/ya.make b/programs/server/ya.make deleted file mode 100644 index 1b99fb31a3f..00000000000 --- a/programs/server/ya.make +++ /dev/null @@ -1,22 +0,0 @@ -OWNER(g:clickhouse) - -PROGRAM(clickhouse-server) - -PEERDIR( - clickhouse/base/common - clickhouse/base/daemon - clickhouse/base/loggers - clickhouse/src - contrib/libs/poco/NetSSL_OpenSSL -) - -CFLAGS(-g0) - -SRCS( - clickhouse-server.cpp - - MetricsTransmitter.cpp - Server.cpp -) - -END() diff --git a/programs/static-files-disk-uploader/CMakeLists.txt b/programs/static-files-disk-uploader/CMakeLists.txt new file mode 100644 index 00000000000..1f76dd7e8b2 --- /dev/null +++ b/programs/static-files-disk-uploader/CMakeLists.txt @@ -0,0 +1,9 @@ +set (CLICKHOUSE_STATIC_FILES_DISK_UPLOADER_SOURCES static-files-disk-uploader.cpp) + +set (CLICKHOUSE_STATIC_FILES_DISK_UPLOADER_LINK + PRIVATE + boost::program_options + dbms +) + +clickhouse_program_add(static-files-disk-uploader) diff --git a/programs/static-files-disk-uploader/clickhouse-static-files-disk-uploader.cpp b/programs/static-files-disk-uploader/clickhouse-static-files-disk-uploader.cpp new file mode 100644 index 00000000000..063604b10b1 --- /dev/null +++ b/programs/static-files-disk-uploader/clickhouse-static-files-disk-uploader.cpp @@ -0,0 +1,2 @@ +int mainEntryClickHouseStaticFilesDiskUploader(int argc, char ** argv); +int main(int argc_, char ** argv_) { return mainEntryClickHouseStaticFilesDiskUploader(argc_, argv_); } diff --git a/programs/static-files-disk-uploader/static-files-disk-uploader.cpp b/programs/static-files-disk-uploader/static-files-disk-uploader.cpp new file mode 100644 index 00000000000..ad3a3090de6 --- /dev/null +++ b/programs/static-files-disk-uploader/static-files-disk-uploader.cpp @@ -0,0 +1,197 @@ +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace fs = std::filesystem; + +#define EXTRACT_PATH_PATTERN ".*\\/store/(.*)" + + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int BAD_ARGUMENTS; +} + +/* + * A tool to collect table data files on local fs as is (into current directory or into path from --output-dir option). + * If test-mode option is added, files will be put by given url via PUT request. + */ + +void processFile(const fs::path & file_path, const fs::path & dst_path, bool test_mode, WriteBuffer & metadata_buf) +{ + String remote_path; + RE2::FullMatch(file_path.string(), EXTRACT_PATH_PATTERN, &remote_path); + bool is_directory = fs::is_directory(file_path); + + writeText(file_path.filename().string(), metadata_buf); + writeChar('\t', metadata_buf); + writeBoolText(is_directory, metadata_buf); + if (!is_directory) + { + writeChar('\t', metadata_buf); + writeIntText(fs::file_size(file_path), metadata_buf); + } + writeChar('\n', metadata_buf); + + if (is_directory) + return; + + auto dst_file_path = fs::path(dst_path) / remote_path; + + auto src_buf = createReadBufferFromFileBase(file_path, {}, fs::file_size(file_path)); + std::shared_ptr dst_buf; + + /// test mode for integration tests. + if (test_mode) + dst_buf = std::make_shared(Poco::URI(dst_file_path), Poco::Net::HTTPRequest::HTTP_PUT); + else + dst_buf = std::make_shared(dst_file_path); + + copyData(*src_buf, *dst_buf); + dst_buf->next(); + dst_buf->finalize(); +}; + + +void processTableFiles(const fs::path & data_path, fs::path dst_path, bool test_mode) +{ + std::cerr << "Data path: " << data_path << ", destination path: " << dst_path << std::endl; + + String prefix; + RE2::FullMatch(data_path.string(), EXTRACT_PATH_PATTERN, &prefix); + + std::shared_ptr root_meta; + if (test_mode) + { + dst_path /= "store"; + auto files_root = dst_path / prefix; + root_meta = std::make_shared(Poco::URI(files_root / ".index"), Poco::Net::HTTPRequest::HTTP_PUT); + } + else + { + dst_path = fs::canonical(dst_path); + auto files_root = dst_path / prefix; + fs::create_directories(files_root); + root_meta = std::make_shared(files_root / ".index"); + } + + fs::directory_iterator dir_end; + for (fs::directory_iterator dir_it(data_path); dir_it != dir_end; ++dir_it) + { + if (dir_it->is_directory()) + { + processFile(dir_it->path(), dst_path, test_mode, *root_meta); + + String directory_prefix; + RE2::FullMatch(dir_it->path().string(), EXTRACT_PATH_PATTERN, &directory_prefix); + + std::shared_ptr directory_meta; + if (test_mode) + { + auto files_root = dst_path / prefix; + directory_meta = std::make_shared(Poco::URI(dst_path / directory_prefix / ".index"), Poco::Net::HTTPRequest::HTTP_PUT); + } + else + { + dst_path = fs::canonical(dst_path); + auto files_root = dst_path / prefix; + fs::create_directories(dst_path / directory_prefix); + directory_meta = std::make_shared(dst_path / directory_prefix / ".index"); + } + + fs::directory_iterator files_end; + for (fs::directory_iterator file_it(dir_it->path()); file_it != files_end; ++file_it) + processFile(file_it->path(), dst_path, test_mode, *directory_meta); + + directory_meta->next(); + directory_meta->finalize(); + } + else + { + processFile(dir_it->path(), dst_path, test_mode, *root_meta); + } + } + root_meta->next(); + root_meta->finalize(); +} +} + +int mainEntryClickHouseStaticFilesDiskUploader(int argc, char ** argv) +try +{ + using namespace DB; + namespace po = boost::program_options; + + po::options_description description("Allowed options", getTerminalWidth()); + description.add_options() + ("help,h", "produce help message") + ("metadata-path", po::value(), "Metadata path (select data_paths from system.tables where name='table_name'") + ("test-mode", "Use test mode, which will put data on given url via PUT") + ("url", po::value(), "Web server url for test mode") + ("output-dir", po::value(), "Directory to put files in non-test mode"); + + po::parsed_options parsed = po::command_line_parser(argc, argv).options(description).run(); + po::variables_map options; + po::store(parsed, options); + po::notify(options); + + if (options.empty() || options.count("help")) + { + std::cout << description << std::endl; + exit(0); + } + + String metadata_path; + + if (options.count("metadata-path")) + metadata_path = options["metadata-path"].as(); + else + throw Exception(ErrorCodes::BAD_ARGUMENTS, "No metadata-path option passed"); + + fs::path fs_path = fs::weakly_canonical(metadata_path); + if (!fs::exists(fs_path)) + { + std::cerr << fmt::format("Data path ({}) does not exist", fs_path.string()); + return 1; + } + + String root_path; + auto test_mode = options.contains("test-mode"); + if (test_mode) + { + if (options.count("url")) + root_path = options["url"].as(); + else + throw Exception(ErrorCodes::BAD_ARGUMENTS, "No url option passed for test mode"); + } + else + { + if (options.count("output-dir")) + root_path = options["output-dir"].as(); + else + root_path = fs::current_path(); + } + + processTableFiles(fs_path, root_path, test_mode); + + return 0; +} +catch (...) +{ + std::cerr << DB::getCurrentExceptionMessage(false); + return 1; +} diff --git a/programs/ya.make b/programs/ya.make deleted file mode 100644 index 2de3052f1d2..00000000000 --- a/programs/ya.make +++ /dev/null @@ -1,31 +0,0 @@ -OWNER(g:clickhouse) - -PROGRAM(clickhouse) - -CFLAGS( - -DENABLE_CLICKHOUSE_CLIENT - -DENABLE_CLICKHOUSE_EXTRACT_FROM_CONFIG - -DENABLE_CLICKHOUSE_SERVER -) - -PEERDIR( - clickhouse/base/daemon - clickhouse/base/loggers - clickhouse/src -) - -CFLAGS(-g0) - -SRCS( - main.cpp - - client/Client.cpp - client/QueryFuzzer.cpp - client/ConnectionParameters.cpp - client/Suggest.cpp - extract-from-config/ExtractFromConfig.cpp - server/Server.cpp - server/MetricsTransmitter.cpp -) - -END() diff --git a/release b/release index de549595d43..6e6970d7b00 100755 --- a/release +++ b/release @@ -60,9 +60,6 @@ then elif [[ "$SANITIZER" == "thread" ]]; then VERSION_POSTFIX+="+tsan" elif [[ "$SANITIZER" == "memory" ]]; then VERSION_POSTFIX+="+msan" elif [[ "$SANITIZER" == "undefined" ]]; then VERSION_POSTFIX+="+ubsan" - elif [[ "$SANITIZER" == "libfuzzer" ]]; then - VERSION_POSTFIX+="+libfuzzer" - MALLOC_OPTS="-DENABLE_TCMALLOC=0 -DENABLE_JEMALLOC=0" else echo "Unknown value of SANITIZER variable: $SANITIZER" exit 3 diff --git a/src/Access/AccessControlManager.cpp b/src/Access/AccessControlManager.cpp index 95701bd42df..ff3ebdea9f8 100644 --- a/src/Access/AccessControlManager.cpp +++ b/src/Access/AccessControlManager.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Access/AccessControlManager.h b/src/Access/AccessControlManager.h index 15079ea61be..79f7073ef69 100644 --- a/src/Access/AccessControlManager.h +++ b/src/Access/AccessControlManager.h @@ -143,10 +143,11 @@ public: std::vector getAllQuotasUsage() const; - std::shared_ptr getEnabledSettings(const UUID & user_id, - const SettingsProfileElements & settings_from_user, - const boost::container::flat_set & enabled_roles, - const SettingsProfileElements & settings_from_enabled_roles) const; + std::shared_ptr getEnabledSettings( + const UUID & user_id, + const SettingsProfileElements & settings_from_user, + const boost::container::flat_set & enabled_roles, + const SettingsProfileElements & settings_from_enabled_roles) const; std::shared_ptr getSettingsProfileInfo(const UUID & profile_id); diff --git a/src/Access/AccessFlags.h b/src/Access/AccessFlags.h index 7e32f423564..b107248e02b 100644 --- a/src/Access/AccessFlags.h +++ b/src/Access/AccessFlags.h @@ -1,8 +1,8 @@ #pragma once #include -#include -#include +#include +#include #include #include #include diff --git a/src/Access/AccessRights.cpp b/src/Access/AccessRights.cpp index d4b2dc8a252..6cc1292a9f5 100644 --- a/src/Access/AccessRights.cpp +++ b/src/Access/AccessRights.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/src/Access/AccessRights.h b/src/Access/AccessRights.h index a90616ea27f..2657b66d824 100644 --- a/src/Access/AccessRights.h +++ b/src/Access/AccessRights.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/Access/AccessType.h b/src/Access/AccessType.h index 02d7e4982f9..5e156b23e58 100644 --- a/src/Access/AccessType.h +++ b/src/Access/AccessType.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include @@ -43,7 +43,9 @@ enum class AccessType M(ALTER_COMMENT_COLUMN, "COMMENT COLUMN", COLUMN, ALTER_COLUMN) \ M(ALTER_CLEAR_COLUMN, "CLEAR COLUMN", COLUMN, ALTER_COLUMN) \ M(ALTER_RENAME_COLUMN, "RENAME COLUMN", COLUMN, ALTER_COLUMN) \ + M(ALTER_MATERIALIZE_COLUMN, "MATERIALIZE COLUMN", COLUMN, ALTER_COLUMN) \ M(ALTER_COLUMN, "", GROUP, ALTER_TABLE) /* allow to execute ALTER {ADD|DROP|MODIFY...} COLUMN */\ + M(ALTER_MODIFY_COMMENT, "MODIFY COMMENT", TABLE, ALTER_TABLE) /* modify table comment */\ \ M(ALTER_ORDER_BY, "ALTER MODIFY ORDER BY, MODIFY ORDER BY", TABLE, ALTER_INDEX) \ M(ALTER_SAMPLE_BY, "ALTER MODIFY SAMPLE BY, MODIFY SAMPLE BY", TABLE, ALTER_INDEX) \ @@ -71,7 +73,10 @@ enum class AccessType M(ALTER_FETCH_PARTITION, "ALTER FETCH PART, FETCH PARTITION", TABLE, ALTER_TABLE) \ M(ALTER_FREEZE_PARTITION, "FREEZE PARTITION, UNFREEZE", TABLE, ALTER_TABLE) \ \ + M(ALTER_DATABASE_SETTINGS, "ALTER DATABASE SETTING, ALTER MODIFY DATABASE SETTING, MODIFY DATABASE SETTING", DATABASE, ALTER_DATABASE) /* allows to execute ALTER MODIFY SETTING */\ + \ M(ALTER_TABLE, "", GROUP, ALTER) \ + M(ALTER_DATABASE, "", GROUP, ALTER) \ \ M(ALTER_VIEW_REFRESH, "ALTER LIVE VIEW REFRESH, REFRESH VIEW", VIEW, ALTER_VIEW) \ M(ALTER_VIEW_MODIFY_QUERY, "ALTER TABLE MODIFY QUERY", VIEW, ALTER_VIEW) \ @@ -87,6 +92,7 @@ enum class AccessType M(CREATE_DICTIONARY, "", DICTIONARY, CREATE) /* allows to execute {CREATE|ATTACH} DICTIONARY */\ M(CREATE_TEMPORARY_TABLE, "", GLOBAL, CREATE) /* allows to create and manipulate temporary tables; implicitly enabled by the grant CREATE_TABLE on any table */ \ + M(CREATE_FUNCTION, "", DATABASE, CREATE) /* allows to execute CREATE FUNCTION */ \ M(CREATE, "", GROUP, ALL) /* allows to execute {CREATE|ATTACH} */ \ \ M(DROP_DATABASE, "", DATABASE, DROP) /* allows to execute {DROP|DETACH} DATABASE */\ @@ -94,6 +100,7 @@ enum class AccessType M(DROP_VIEW, "", VIEW, DROP) /* allows to execute {DROP|DETACH} TABLE for views; implicitly enabled by the grant DROP_TABLE */\ M(DROP_DICTIONARY, "", DICTIONARY, DROP) /* allows to execute {DROP|DETACH} DICTIONARY */\ + M(DROP_FUNCTION, "", DATABASE, DROP) /* allows to execute DROP FUNCTION */\ M(DROP, "", GROUP, ALL) /* allows to execute {DROP|DETACH} */\ \ M(TRUNCATE, "TRUNCATE TABLE", TABLE, ALL) \ @@ -140,6 +147,7 @@ enum class AccessType M(SYSTEM_RELOAD_SYMBOLS, "RELOAD SYMBOLS", GLOBAL, SYSTEM_RELOAD) \ M(SYSTEM_RELOAD_DICTIONARY, "SYSTEM RELOAD DICTIONARIES, RELOAD DICTIONARY, RELOAD DICTIONARIES", GLOBAL, SYSTEM_RELOAD) \ M(SYSTEM_RELOAD_MODEL, "SYSTEM RELOAD MODELS, RELOAD MODEL, RELOAD MODELS", GLOBAL, SYSTEM_RELOAD) \ + M(SYSTEM_RELOAD_FUNCTION, "SYSTEM RELOAD FUNCTIONS, RELOAD FUNCTION, RELOAD FUNCTIONS", GLOBAL, SYSTEM_RELOAD) \ M(SYSTEM_RELOAD_EMBEDDED_DICTIONARIES, "RELOAD EMBEDDED DICTIONARIES", GLOBAL, SYSTEM_RELOAD) /* implicitly enabled by the grant SYSTEM_RELOAD_DICTIONARY ON *.* */\ M(SYSTEM_RELOAD, "", GROUP, SYSTEM) \ M(SYSTEM_RESTART_DISK, "SYSTEM RESTART DISK", GLOBAL, SYSTEM) \ diff --git a/src/Access/AllowedClientHosts.cpp b/src/Access/AllowedClientHosts.cpp index 5ac05bea88d..f306b1386dd 100644 --- a/src/Access/AllowedClientHosts.cpp +++ b/src/Access/AllowedClientHosts.cpp @@ -1,8 +1,7 @@ #include #include -#include -#include -#include +#include +#include #include #include #include diff --git a/src/Access/AllowedClientHosts.h b/src/Access/AllowedClientHosts.h index 7b21fd7e236..30c0dac076e 100644 --- a/src/Access/AllowedClientHosts.h +++ b/src/Access/AllowedClientHosts.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/Access/Authentication.h b/src/Access/Authentication.h index 54542cb504a..8622db7dab5 100644 --- a/src/Access/Authentication.h +++ b/src/Access/Authentication.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/Access/ContextAccess.cpp b/src/Access/ContextAccess.cpp index 39b57a40e7a..a186ffb3495 100644 --- a/src/Access/ContextAccess.cpp +++ b/src/Access/ContextAccess.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -119,8 +119,10 @@ namespace AccessRights res = access; res.modifyFlags(modifier); - /// Anyone has access to the "system" database. + /// Anyone has access to the "system" and "information_schema" database. res.grant(AccessType::SELECT, DatabaseCatalog::SYSTEM_DATABASE); + res.grant(AccessType::SELECT, DatabaseCatalog::INFORMATION_SCHEMA); + res.grant(AccessType::SELECT, DatabaseCatalog::INFORMATION_SCHEMA_UPPERCASE); return res; } diff --git a/src/Access/ContextAccess.h b/src/Access/ContextAccess.h index cde69471800..8f5f5a096e7 100644 --- a/src/Access/ContextAccess.h +++ b/src/Access/ContextAccess.h @@ -4,8 +4,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/Access/Credentials.h b/src/Access/Credentials.h index 256ed3853ab..1f99f0042f7 100644 --- a/src/Access/Credentials.h +++ b/src/Access/Credentials.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include diff --git a/src/Access/DiskAccessStorage.cpp b/src/Access/DiskAccessStorage.cpp index 5fb6f48e1ee..e3d773f4d91 100644 --- a/src/Access/DiskAccessStorage.cpp +++ b/src/Access/DiskAccessStorage.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/src/Access/EnabledQuota.cpp b/src/Access/EnabledQuota.cpp index 4affa4f3ec1..d776b2b851a 100644 --- a/src/Access/EnabledQuota.cpp +++ b/src/Access/EnabledQuota.cpp @@ -2,8 +2,8 @@ #include #include #include -#include -#include +#include +#include #include #include diff --git a/src/Access/EnabledRoles.h b/src/Access/EnabledRoles.h index 5cb00eb1829..efec5833fca 100644 --- a/src/Access/EnabledRoles.h +++ b/src/Access/EnabledRoles.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/Access/EnabledRowPolicies.h b/src/Access/EnabledRowPolicies.h index 5e819733963..8ed923e98e4 100644 --- a/src/Access/EnabledRowPolicies.h +++ b/src/Access/EnabledRowPolicies.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/Access/ExternalAuthenticators.h b/src/Access/ExternalAuthenticators.h index 24f1f7b6528..8ece77cd9ef 100644 --- a/src/Access/ExternalAuthenticators.h +++ b/src/Access/ExternalAuthenticators.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Access/GSSAcceptor.cpp b/src/Access/GSSAcceptor.cpp index a33e825f510..207baf955e0 100644 --- a/src/Access/GSSAcceptor.cpp +++ b/src/Access/GSSAcceptor.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include diff --git a/src/Access/GSSAcceptor.h b/src/Access/GSSAcceptor.h index 8d207c59c01..aa11507e559 100644 --- a/src/Access/GSSAcceptor.h +++ b/src/Access/GSSAcceptor.h @@ -5,7 +5,7 @@ #endif #include -#include +#include #include #if USE_KRB5 diff --git a/src/Access/IAccessEntity.h b/src/Access/IAccessEntity.h index 18b450bff5c..d0fbde8da97 100644 --- a/src/Access/IAccessEntity.h +++ b/src/Access/IAccessEntity.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/Access/IAccessStorage.cpp b/src/Access/IAccessStorage.cpp index f0fbb95ff4e..aade1fdd6f1 100644 --- a/src/Access/IAccessStorage.cpp +++ b/src/Access/IAccessStorage.cpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace DB @@ -96,7 +97,7 @@ namespace bool errors() const { return exception.has_value(); } - void showErrors(const char * format, const std::function & get_name_function) + void showErrors(const char * format, Fn auto && get_name_function) { if (!exception) return; diff --git a/src/Access/IAccessStorage.h b/src/Access/IAccessStorage.h index bf45ed5b5ce..e9df2e3c1a4 100644 --- a/src/Access/IAccessStorage.h +++ b/src/Access/IAccessStorage.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Access/LDAPAccessStorage.cpp b/src/Access/LDAPAccessStorage.cpp index 07b9d089198..8a612982c79 100644 --- a/src/Access/LDAPAccessStorage.cpp +++ b/src/Access/LDAPAccessStorage.cpp @@ -6,8 +6,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/Access/LDAPAccessStorage.h b/src/Access/LDAPAccessStorage.h index 3e5b10494ed..6cfff07b436 100644 --- a/src/Access/LDAPAccessStorage.h +++ b/src/Access/LDAPAccessStorage.h @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/Access/LDAPClient.cpp b/src/Access/LDAPClient.cpp index c12b0f22ab0..c666520c069 100644 --- a/src/Access/LDAPClient.cpp +++ b/src/Access/LDAPClient.cpp @@ -1,7 +1,7 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/src/Access/LDAPClient.h b/src/Access/LDAPClient.h index 85003da31f1..143047c6f95 100644 --- a/src/Access/LDAPClient.h +++ b/src/Access/LDAPClient.h @@ -4,7 +4,7 @@ # include "config_core.h" #endif -#include +#include #if USE_LDAP # include diff --git a/src/Access/MemoryAccessStorage.cpp b/src/Access/MemoryAccessStorage.cpp index e788ca11cf2..68a24146107 100644 --- a/src/Access/MemoryAccessStorage.cpp +++ b/src/Access/MemoryAccessStorage.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/src/Access/MultipleAccessStorage.cpp b/src/Access/MultipleAccessStorage.cpp index dbeecc8a2bc..bb2ef4a6df4 100644 --- a/src/Access/MultipleAccessStorage.cpp +++ b/src/Access/MultipleAccessStorage.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Access/Quota.h b/src/Access/Quota.h index 5adc6ec95e1..5d23cf11d42 100644 --- a/src/Access/Quota.h +++ b/src/Access/Quota.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/Access/QuotaCache.cpp b/src/Access/QuotaCache.cpp index c20a436e1b9..f742751d5fd 100644 --- a/src/Access/QuotaCache.cpp +++ b/src/Access/QuotaCache.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Access/QuotaCache.h b/src/Access/QuotaCache.h index b5918f86dd4..e991399d2e9 100644 --- a/src/Access/QuotaCache.h +++ b/src/Access/QuotaCache.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/Access/ReplicatedAccessStorage.cpp b/src/Access/ReplicatedAccessStorage.cpp index f91b7c8fb06..d50ecda0c9e 100644 --- a/src/Access/ReplicatedAccessStorage.cpp +++ b/src/Access/ReplicatedAccessStorage.cpp @@ -7,8 +7,8 @@ #include #include #include -#include -#include +#include +#include namespace DB @@ -63,9 +63,12 @@ void ReplicatedAccessStorage::shutdown() bool prev_stop_flag = stop_flag.exchange(true); if (!prev_stop_flag) { - /// Notify the worker thread to stop waiting for new queue items - refresh_queue.push(UUIDHelpers::Nil); - worker_thread.join(); + if (worker_thread.joinable()) + { + /// Notify the worker thread to stop waiting for new queue items + refresh_queue.push(UUIDHelpers::Nil); + worker_thread.join(); + } } } diff --git a/src/Access/ReplicatedAccessStorage.h b/src/Access/ReplicatedAccessStorage.h index 377a82fd511..0df1d5ef5ff 100644 --- a/src/Access/ReplicatedAccessStorage.h +++ b/src/Access/ReplicatedAccessStorage.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/Access/RoleCache.cpp b/src/Access/RoleCache.cpp index d264ec2d953..e9c88868e8c 100644 --- a/src/Access/RoleCache.cpp +++ b/src/Access/RoleCache.cpp @@ -3,6 +3,7 @@ #include #include #include +#include namespace DB @@ -11,7 +12,7 @@ namespace { void collectRoles(EnabledRolesInfo & roles_info, boost::container::flat_set & skip_ids, - const std::function & get_role_function, + Fn auto && get_role_function, const UUID & role_id, bool is_current_role, bool with_admin_option) @@ -113,7 +114,9 @@ void RoleCache::collectEnabledRoles(EnabledRoles & enabled, scope_guard & notifi /// Collect enabled roles. That includes the current roles, the roles granted to the current roles, and so on. auto new_info = std::make_shared(); boost::container::flat_set skip_ids; + auto get_role_function = [this](const UUID & id) { return getRole(id); }; + for (const auto & current_role : enabled.params.current_roles) collectRoles(*new_info, skip_ids, get_role_function, current_role, true, false); diff --git a/src/Access/RowPolicyCache.cpp b/src/Access/RowPolicyCache.cpp index b4e3c7d16ab..c8402dbdbd4 100644 --- a/src/Access/RowPolicyCache.cpp +++ b/src/Access/RowPolicyCache.cpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Access/RowPolicyCache.h b/src/Access/RowPolicyCache.h index 6f3964cdadb..959eb989d4c 100644 --- a/src/Access/RowPolicyCache.h +++ b/src/Access/RowPolicyCache.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include diff --git a/src/Access/SettingsProfileElement.cpp b/src/Access/SettingsProfileElement.cpp index edbb7509e9e..b42bcd1c279 100644 --- a/src/Access/SettingsProfileElement.cpp +++ b/src/Access/SettingsProfileElement.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace DB diff --git a/src/Access/SettingsProfilesCache.h b/src/Access/SettingsProfilesCache.h index 23a37212883..e5ba70b9df8 100644 --- a/src/Access/SettingsProfilesCache.h +++ b/src/Access/SettingsProfilesCache.h @@ -2,7 +2,7 @@ #include #include -#include +#include #include #include diff --git a/src/Access/SettingsProfilesInfo.cpp b/src/Access/SettingsProfilesInfo.cpp index 46ebb6084e7..7efb16dd865 100644 --- a/src/Access/SettingsProfilesInfo.cpp +++ b/src/Access/SettingsProfilesInfo.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include namespace DB diff --git a/src/Access/SettingsProfilesInfo.h b/src/Access/SettingsProfilesInfo.h index d1fba0e9f5f..f554ba8d89e 100644 --- a/src/Access/SettingsProfilesInfo.h +++ b/src/Access/SettingsProfilesInfo.h @@ -36,6 +36,16 @@ struct SettingsProfilesInfo friend bool operator ==(const SettingsProfilesInfo & lhs, const SettingsProfilesInfo & rhs); friend bool operator !=(const SettingsProfilesInfo & lhs, const SettingsProfilesInfo & rhs) { return !(lhs == rhs); } + Strings getProfileNames() const + { + Strings result; + result.reserve(profiles.size()); + for (const auto & profile_id : profiles) + result.push_back(names_of_profiles.at(profile_id)); + + return result; + } + private: const AccessControlManager & manager; }; diff --git a/src/Access/UsersConfigAccessStorage.cpp b/src/Access/UsersConfigAccessStorage.cpp index 68333ed45da..7c5baa92b27 100644 --- a/src/Access/UsersConfigAccessStorage.cpp +++ b/src/Access/UsersConfigAccessStorage.cpp @@ -13,11 +13,12 @@ #include #include #include -#include +#include #include #include #include #include +#include namespace DB @@ -362,7 +363,7 @@ namespace SettingsProfileElements parseSettingsConstraints(const Poco::Util::AbstractConfiguration & config, const String & path_to_constraints, - const std::function & check_setting_name_function) + Fn auto && check_setting_name_function) { SettingsProfileElements profile_elements; Poco::Util::AbstractConfiguration::Keys keys; @@ -399,7 +400,7 @@ namespace std::shared_ptr parseSettingsProfile( const Poco::Util::AbstractConfiguration & config, const String & profile_name, - const std::function & check_setting_name_function) + Fn auto && check_setting_name_function) { auto profile = std::make_shared(); profile->setName(profile_name); @@ -441,7 +442,7 @@ namespace std::vector parseSettingsProfiles( const Poco::Util::AbstractConfiguration & config, - const std::function & check_setting_name_function) + Fn auto && check_setting_name_function) { std::vector profiles; Poco::Util::AbstractConfiguration::Keys profile_names; diff --git a/src/Access/tests/gtest_access_rights_ops.cpp b/src/Access/tests/gtest_access_rights_ops.cpp index 3d7b396a6f2..2881825dd17 100644 --- a/src/Access/tests/gtest_access_rights_ops.cpp +++ b/src/Access/tests/gtest_access_rights_ops.cpp @@ -45,7 +45,7 @@ TEST(AccessRights, Union) lhs.grant(AccessType::INSERT); rhs.grant(AccessType::ALL, "db1"); lhs.makeUnion(rhs); - ASSERT_EQ(lhs.toString(), "GRANT INSERT ON *.*, GRANT SHOW, SELECT, ALTER, CREATE DATABASE, CREATE TABLE, CREATE VIEW, CREATE DICTIONARY, DROP, TRUNCATE, OPTIMIZE, SYSTEM MERGES, SYSTEM TTL MERGES, SYSTEM FETCHES, SYSTEM MOVES, SYSTEM SENDS, SYSTEM REPLICATION QUEUES, SYSTEM DROP REPLICA, SYSTEM SYNC REPLICA, SYSTEM RESTART REPLICA, SYSTEM RESTORE REPLICA, SYSTEM FLUSH DISTRIBUTED, dictGet ON db1.*"); + ASSERT_EQ(lhs.toString(), "GRANT INSERT ON *.*, GRANT SHOW, SELECT, ALTER, CREATE DATABASE, CREATE TABLE, CREATE VIEW, CREATE DICTIONARY, CREATE FUNCTION, DROP, TRUNCATE, OPTIMIZE, SYSTEM MERGES, SYSTEM TTL MERGES, SYSTEM FETCHES, SYSTEM MOVES, SYSTEM SENDS, SYSTEM REPLICATION QUEUES, SYSTEM DROP REPLICA, SYSTEM SYNC REPLICA, SYSTEM RESTART REPLICA, SYSTEM RESTORE REPLICA, SYSTEM FLUSH DISTRIBUTED, dictGet ON db1.*"); } diff --git a/src/Access/tests/gtest_replicated_access_storage.cpp b/src/Access/tests/gtest_replicated_access_storage.cpp new file mode 100644 index 00000000000..f2052e91749 --- /dev/null +++ b/src/Access/tests/gtest_replicated_access_storage.cpp @@ -0,0 +1,46 @@ +#include +#include + +using namespace DB; + +namespace DB +{ +namespace ErrorCodes +{ + extern const int NO_ZOOKEEPER; +} +} + + +TEST(ReplicatedAccessStorage, ShutdownWithoutStartup) +{ + auto get_zk = []() + { + return std::shared_ptr(); + }; + + auto storage = ReplicatedAccessStorage("replicated", "/clickhouse/access", get_zk); + storage.shutdown(); +} + + +TEST(ReplicatedAccessStorage, ShutdownWithFailedStartup) +{ + auto get_zk = []() + { + return std::shared_ptr(); + }; + + auto storage = ReplicatedAccessStorage("replicated", "/clickhouse/access", get_zk); + try + { + storage.startup(); + } + catch (Exception & e) + { + if (e.code() != ErrorCodes::NO_ZOOKEEPER) + throw; + } + storage.shutdown(); +} + diff --git a/src/Access/ya.make b/src/Access/ya.make deleted file mode 100644 index 8a1f96bb870..00000000000 --- a/src/Access/ya.make +++ /dev/null @@ -1,54 +0,0 @@ -# This file is generated automatically, do not edit. See 'ya.make.in' and use 'utils/generate-ya-make' to regenerate it. -OWNER(g:clickhouse) - -LIBRARY() - -PEERDIR( - clickhouse/src/Common -) - - -SRCS( - AccessControlManager.cpp - AccessEntityIO.cpp - AccessRights.cpp - AccessRightsElement.cpp - AllowedClientHosts.cpp - Authentication.cpp - ContextAccess.cpp - Credentials.cpp - DiskAccessStorage.cpp - EnabledQuota.cpp - EnabledRoles.cpp - EnabledRolesInfo.cpp - EnabledRowPolicies.cpp - EnabledSettings.cpp - ExternalAuthenticators.cpp - GSSAcceptor.cpp - GrantedRoles.cpp - IAccessEntity.cpp - IAccessStorage.cpp - LDAPAccessStorage.cpp - LDAPClient.cpp - MemoryAccessStorage.cpp - MultipleAccessStorage.cpp - Quota.cpp - QuotaCache.cpp - QuotaUsage.cpp - ReplicatedAccessStorage.cpp - Role.cpp - RoleCache.cpp - RolesOrUsersSet.cpp - RowPolicy.cpp - RowPolicyCache.cpp - SettingsConstraints.cpp - SettingsProfile.cpp - SettingsProfileElement.cpp - SettingsProfilesCache.cpp - SettingsProfilesInfo.cpp - User.cpp - UsersConfigAccessStorage.cpp - -) - -END() diff --git a/src/Access/ya.make.in b/src/Access/ya.make.in deleted file mode 100644 index 5fa69cec4bb..00000000000 --- a/src/Access/ya.make.in +++ /dev/null @@ -1,14 +0,0 @@ -OWNER(g:clickhouse) - -LIBRARY() - -PEERDIR( - clickhouse/src/Common -) - - -SRCS( - -) - -END() diff --git a/src/AggregateFunctions/AggregateFunctionArgMinMax.h b/src/AggregateFunctions/AggregateFunctionArgMinMax.h index 335ee7c8ecb..6c43c3ed061 100644 --- a/src/AggregateFunctions/AggregateFunctionArgMinMax.h +++ b/src/AggregateFunctions/AggregateFunctionArgMinMax.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include // SingleValueDataString used in embedded compiler diff --git a/src/AggregateFunctions/AggregateFunctionArray.cpp b/src/AggregateFunctions/AggregateFunctionArray.cpp index 982180ab50c..3591bea5f9e 100644 --- a/src/AggregateFunctions/AggregateFunctionArray.cpp +++ b/src/AggregateFunctions/AggregateFunctionArray.cpp @@ -21,6 +21,8 @@ class AggregateFunctionCombinatorArray final : public IAggregateFunctionCombinat public: String getName() const override { return "Array"; } + bool supportsNesting() const override { return true; } + DataTypes transformArguments(const DataTypes & arguments) const override { if (arguments.empty()) diff --git a/src/AggregateFunctions/AggregateFunctionAvg.h b/src/AggregateFunctions/AggregateFunctionAvg.h index ad5c67d88d4..fd8f9faa3f8 100644 --- a/src/AggregateFunctions/AggregateFunctionAvg.h +++ b/src/AggregateFunctions/AggregateFunctionAvg.h @@ -21,11 +21,9 @@ namespace DB { struct Settings; -template -using DecimalOrVectorCol = std::conditional_t, ColumnDecimal, ColumnVector>; template constexpr bool DecimalOrExtendedInt = - IsDecimalNumber + is_decimal || std::is_same_v || std::is_same_v || std::is_same_v @@ -44,7 +42,7 @@ struct AvgFraction /// Invoked only is either Numerator or Denominator are Decimal. Float64 NO_SANITIZE_UNDEFINED divideIfAnyDecimal(UInt32 num_scale, UInt32 denom_scale [[maybe_unused]]) const { - if constexpr (IsDecimalNumber && IsDecimalNumber) + if constexpr (is_decimal && is_decimal) { // According to the docs, num(S1) / denom(S2) would have scale S1 @@ -60,7 +58,7 @@ struct AvgFraction /// Numerator is always casted to Float64 to divide correctly if the denominator is not Float64. Float64 num_converted; - if constexpr (IsDecimalNumber) + if constexpr (is_decimal) num_converted = DecimalUtils::convertTo(numerator, num_scale); else num_converted = static_cast(numerator); /// all other types, including extended integral. @@ -68,7 +66,7 @@ struct AvgFraction std::conditional_t, Float64, Denominator> denom_converted; - if constexpr (IsDecimalNumber) + if constexpr (is_decimal) denom_converted = DecimalUtils::convertTo(denominator, denom_scale); else if constexpr (DecimalOrExtendedInt) /// no way to divide Float64 and extended integral type without an explicit cast. @@ -139,7 +137,7 @@ public: void insertResultInto(AggregateDataPtr __restrict place, IColumn & to, Arena *) const override { - if constexpr (IsDecimalNumber || IsDecimalNumber) + if constexpr (is_decimal || is_decimal) assert_cast &>(to).getData().push_back( this->data(place).divideIfAnyDecimal(num_scale, denom_scale)); else @@ -222,7 +220,7 @@ private: }; template -using AvgFieldType = std::conditional_t, +using AvgFieldType = std::conditional_t, std::conditional_t, Decimal256, Decimal128>, NearestFieldType>; @@ -239,7 +237,7 @@ public: void NO_SANITIZE_UNDEFINED add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena *) const final { - this->data(place).numerator += static_cast &>(*columns[0]).getData()[row_num]; + this->data(place).numerator += static_cast &>(*columns[0]).getData()[row_num]; ++this->data(place).denominator; } diff --git a/src/AggregateFunctions/AggregateFunctionAvgWeighted.h b/src/AggregateFunctions/AggregateFunctionAvgWeighted.h index 68d48803718..6189ae92ce4 100644 --- a/src/AggregateFunctions/AggregateFunctionAvgWeighted.h +++ b/src/AggregateFunctions/AggregateFunctionAvgWeighted.h @@ -8,7 +8,7 @@ namespace DB struct Settings; template -using AvgWeightedFieldType = std::conditional_t, +using AvgWeightedFieldType = std::conditional_t, std::conditional_t, Decimal256, Decimal128>, std::conditional_t, Float64, // no way to do UInt128 * UInt128, better cast to Float64 @@ -34,10 +34,10 @@ public: void NO_SANITIZE_UNDEFINED add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena *) const override { - const auto& weights = static_cast &>(*columns[1]); + const auto& weights = static_cast &>(*columns[1]); this->data(place).numerator += static_cast( - static_cast &>(*columns[0]).getData()[row_num]) * + static_cast &>(*columns[0]).getData()[row_num]) * static_cast(weights.getData()[row_num]); this->data(place).denominator += static_cast(weights.getData()[row_num]); diff --git a/src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.h b/src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.h index c31be25e950..9375d6da3da 100644 --- a/src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.h +++ b/src/AggregateFunctions/AggregateFunctionCategoricalInformationValue.h @@ -8,7 +8,7 @@ #include #include -#include +#include namespace DB diff --git a/src/AggregateFunctions/AggregateFunctionExponentialMovingAverage.cpp b/src/AggregateFunctions/AggregateFunctionExponentialMovingAverage.cpp new file mode 100644 index 00000000000..8569e8f9c8c --- /dev/null +++ b/src/AggregateFunctions/AggregateFunctionExponentialMovingAverage.cpp @@ -0,0 +1,98 @@ +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace DB +{ + +namespace ErrorCodes +{ + extern const int NUMBER_OF_ARGUMENTS_DOESNT_MATCH; + extern const int ILLEGAL_TYPE_OF_ARGUMENT; +} + + +/** See the comments in ExponentiallySmoothedCounter.h + */ +class AggregateFunctionExponentialMovingAverage final + : public IAggregateFunctionDataHelper +{ +private: + String name; + Float64 half_decay; + +public: + AggregateFunctionExponentialMovingAverage(const DataTypes & argument_types_, const Array & params) + : IAggregateFunctionDataHelper(argument_types_, params) + { + if (params.size() != 1) + throw Exception{"Aggregate function " + getName() + " requires exactly one parameter: half decay time.", + ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH}; + + half_decay = applyVisitor(FieldVisitorConvertToNumber(), params[0]); + } + + String getName() const override + { + return "exponentialMovingAverage"; + } + + DataTypePtr getReturnType() const override + { + return std::make_shared>(); + } + + bool allocatesMemoryInArena() const override { return false; } + + void add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena *) const override + { + const auto & value = columns[0]->getFloat64(row_num); + const auto & time = columns[1]->getFloat64(row_num); + this->data(place).add(value, time, half_decay); + } + + void merge(AggregateDataPtr __restrict place, ConstAggregateDataPtr rhs, Arena *) const override + { + this->data(place).merge(this->data(rhs), half_decay); + } + + void serialize(ConstAggregateDataPtr __restrict place, WriteBuffer & buf) const override + { + writeBinary(this->data(place).value, buf); + writeBinary(this->data(place).time, buf); + } + + void deserialize(AggregateDataPtr __restrict place, ReadBuffer & buf, Arena *) const override + { + readBinary(this->data(place).value, buf); + readBinary(this->data(place).time, buf); + } + + void insertResultInto(AggregateDataPtr __restrict place, IColumn & to, Arena *) const override + { + auto & column = assert_cast &>(to); + column.getData().push_back(this->data(place).get(half_decay)); + } +}; + +void registerAggregateFunctionExponentialMovingAverage(AggregateFunctionFactory & factory) +{ + factory.registerFunction("exponentialMovingAverage", + [](const std::string & name, const DataTypes & argument_types, const Array & params, const Settings *) -> AggregateFunctionPtr + { + assertBinary(name, argument_types); + for (const auto & type : argument_types) + if (!isNumber(*type)) + throw Exception(ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT, + "Both arguments for aggregate function {} must have numeric type, got {}", name, type->getName()); + return std::make_shared(argument_types, params); + }); +} + +} diff --git a/src/AggregateFunctions/AggregateFunctionFactory.cpp b/src/AggregateFunctions/AggregateFunctionFactory.cpp index c9dcdb54424..4c2c64ef5e1 100644 --- a/src/AggregateFunctions/AggregateFunctionFactory.cpp +++ b/src/AggregateFunctions/AggregateFunctionFactory.cpp @@ -29,6 +29,7 @@ namespace ErrorCodes { extern const int UNKNOWN_AGGREGATE_FUNCTION; extern const int LOGICAL_ERROR; + extern const int ILLEGAL_AGGREGATION; } const String & getAggregateFunctionCanonicalNameIfAny(const String & name) @@ -154,18 +155,36 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl( } /// Combinators of aggregate functions. - /// For every aggregate function 'agg' and combiner '-Comb' there is combined aggregate function with name 'aggComb', + /// For every aggregate function 'agg' and combiner '-Comb' there is a combined aggregate function with the name 'aggComb', /// that can have different number and/or types of arguments, different result type and different behaviour. if (AggregateFunctionCombinatorPtr combinator = AggregateFunctionCombinatorFactory::instance().tryFindSuffix(name)) { + const std::string & combinator_name = combinator->getName(); + if (combinator->isForInternalUsageOnly()) - throw Exception("Aggregate function combinator '" + combinator->getName() + "' is only for internal usage", ErrorCodes::UNKNOWN_AGGREGATE_FUNCTION); + throw Exception(ErrorCodes::UNKNOWN_AGGREGATE_FUNCTION, + "Aggregate function combinator '{}' is only for internal usage", + combinator_name); if (query_context && query_context->getSettingsRef().log_queries) - query_context->addQueryFactoriesInfo(Context::QueryLogFactories::AggregateFunctionCombinator, combinator->getName()); + query_context->addQueryFactoriesInfo(Context::QueryLogFactories::AggregateFunctionCombinator, combinator_name); + + String nested_name = name.substr(0, name.size() - combinator_name.size()); + /// Nested identical combinators (i.e. uniqCombinedIfIf) is not + /// supported (since they don't work -- silently). + /// + /// But non-identical is supported and works. For example, + /// uniqCombinedIfMergeIf is useful in cases when the underlying + /// storage stores AggregateFunction(uniqCombinedIf) and in SELECT you + /// need to filter aggregation result based on another column. + if (!combinator->supportsNesting() && nested_name.ends_with(combinator_name)) + { + throw Exception(ErrorCodes::ILLEGAL_AGGREGATION, + "Nested identical combinator '{}' is not supported", + combinator_name); + } - String nested_name = name.substr(0, name.size() - combinator->getName().size()); DataTypes nested_types = combinator->transformArguments(argument_types); Array nested_parameters = combinator->transformParameters(parameters); @@ -214,7 +233,7 @@ std::optional AggregateFunctionFactory::tryGetPrope return found.properties; /// Combinators of aggregate functions. - /// For every aggregate function 'agg' and combiner '-Comb' there is combined aggregate function with name 'aggComb', + /// For every aggregate function 'agg' and combiner '-Comb' there is a combined aggregate function with the name 'aggComb', /// that can have different number and/or types of arguments, different result type and different behaviour. if (AggregateFunctionCombinatorPtr combinator = AggregateFunctionCombinatorFactory::instance().tryFindSuffix(name)) diff --git a/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp b/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp index e4eff6be901..3e0f1849545 100644 --- a/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp +++ b/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.cpp @@ -25,14 +25,14 @@ namespace template struct MovingSum { - using Data = MovingSumData, Decimal128, NearestFieldType>>; + using Data = MovingSumData, Decimal128, NearestFieldType>>; using Function = MovingImpl; }; template struct MovingAvg { - using Data = MovingAvgData, Decimal128, Float64>>; + using Data = MovingAvgData, Decimal128, Float64>>; using Function = MovingImpl; }; diff --git a/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.h b/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.h index daaa7a69baf..a3b7dc841b6 100644 --- a/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.h +++ b/src/AggregateFunctions/AggregateFunctionGroupArrayMoving.h @@ -87,18 +87,10 @@ class MovingImpl final public: using ResultT = typename Data::Accumulator; - using ColumnSource = std::conditional_t, - ColumnDecimal, - ColumnVector>; + using ColumnSource = ColumnVectorOrDecimal; /// Probably for overflow function in the future. - using ColumnResult = std::conditional_t, - ColumnDecimal, - ColumnVector>; - - using DataTypeResult = std::conditional_t, - DataTypeDecimal, - DataTypeNumber>; + using ColumnResult = ColumnVectorOrDecimal; explicit MovingImpl(const DataTypePtr & data_type_, UInt64 window_size_ = std::numeric_limits::max()) : IAggregateFunctionDataHelper>({data_type_}, {}) @@ -106,14 +98,7 @@ public: String getName() const override { return Data::name; } - DataTypePtr getReturnType() const override - { - if constexpr (IsDecimalNumber) - return std::make_shared(std::make_shared( - DataTypeResult::maxPrecision(), getDecimalScale(*this->argument_types.at(0)))); - else - return std::make_shared(std::make_shared()); - } + DataTypePtr getReturnType() const override { return std::make_shared(getReturnTypeElement()); } void NO_SANITIZE_UNDEFINED add(AggregateDataPtr __restrict place, const IColumn ** columns, size_t row_num, Arena * arena) const override { @@ -196,6 +181,18 @@ public: { return true; } + +private: + auto getReturnTypeElement() const + { + if constexpr (!is_decimal) + return std::make_shared>(); + else + { + using Res = DataTypeDecimal; + return std::make_shared(Res::maxPrecision(), getDecimalScale(*this->argument_types.at(0))); + } + } }; #undef AGGREGATE_FUNCTION_MOVING_MAX_ARRAY_SIZE diff --git a/src/AggregateFunctions/AggregateFunctionIf.cpp b/src/AggregateFunctions/AggregateFunctionIf.cpp index d841fe8c06d..4ac6a2dce21 100644 --- a/src/AggregateFunctions/AggregateFunctionIf.cpp +++ b/src/AggregateFunctions/AggregateFunctionIf.cpp @@ -1,8 +1,7 @@ -#include #include +#include #include "AggregateFunctionNull.h" - namespace DB { @@ -41,6 +40,29 @@ public: } }; +/** Given an array of flags, checks if it's all zeros + * When the buffer is all zeros, this is slightly faster than doing a memcmp since doesn't require allocating memory + * When the buffer has values, this is much faster since it avoids visiting all memory (and the allocation and function calls) + */ +static bool ALWAYS_INLINE inline is_all_zeros(const UInt8 * flags, size_t size) +{ + size_t unroll_size = size - size % 8; + size_t i = 0; + while (i < unroll_size) + { + UInt64 v = *reinterpret_cast(&flags[i]); + if (v) + return false; + i += 8; + } + + for (; i < size; i++) + if (flags[i]) + return false; + + return true; +} + /** There are two cases: for single argument and variadic. * Code for single argument is much more efficient. */ @@ -107,6 +129,38 @@ public: } } + void addBatchSinglePlace(size_t batch_size, AggregateDataPtr place, const IColumn ** columns, Arena * arena, ssize_t) const override + { + const ColumnNullable * column = assert_cast(columns[0]); + const UInt8 * null_map = column->getNullMapData().data(); + const IColumn * columns_param[] = {&column->getNestedColumn()}; + + const IColumn * filter_column = columns[num_arguments - 1]; + if (const ColumnNullable * nullable_column = typeid_cast(filter_column)) + filter_column = nullable_column->getNestedColumnPtr().get(); + if constexpr (result_is_nullable) + { + /// We need to check if there is work to do as otherwise setting the flag would be a mistake, + /// it would mean that the return value would be the default value of the nested type instead of NULL + if (is_all_zeros(assert_cast(filter_column)->getData().data(), batch_size)) + return; + } + + /// Combine the 2 flag arrays so we can call a simplified version (one check vs 2) + /// Note that now the null map will contain 0 if not null and not filtered, or 1 for null or filtered (or both) + const auto * filter_flags = assert_cast(filter_column)->getData().data(); + auto final_nulls = std::make_unique(batch_size); + for (size_t i = 0; i < batch_size; ++i) + final_nulls[i] = (!!null_map[i]) | (!filter_flags[i]); + + this->nested_function->addBatchSinglePlaceNotNull( + batch_size, this->nestedPlace(place), columns_param, final_nulls.get(), arena, -1); + + if constexpr (result_is_nullable) + if (!memoryIsByte(null_map, batch_size, 1)) + this->setFlag(place); + } + #if USE_EMBEDDED_COMPILER void compileAdd(llvm::IRBuilderBase & builder, llvm::Value * aggregate_data_ptr, const DataTypes & arguments_types, const std::vector & argument_values) const override diff --git a/src/AggregateFunctions/AggregateFunctionIntervalLengthSum.cpp b/src/AggregateFunctions/AggregateFunctionIntervalLengthSum.cpp index eac7e6e9409..5186153b69a 100644 --- a/src/AggregateFunctions/AggregateFunctionIntervalLengthSum.cpp +++ b/src/AggregateFunctions/AggregateFunctionIntervalLengthSum.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include namespace DB diff --git a/src/AggregateFunctions/AggregateFunctionMannWhitney.h b/src/AggregateFunctions/AggregateFunctionMannWhitney.h index 365bc45f7b7..3f2b7276c0f 100644 --- a/src/AggregateFunctions/AggregateFunctionMannWhitney.h +++ b/src/AggregateFunctions/AggregateFunctionMannWhitney.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/AggregateFunctions/AggregateFunctionMaxIntersections.h b/src/AggregateFunctions/AggregateFunctionMaxIntersections.h index 2b7b28266c1..14e5abcfb97 100644 --- a/src/AggregateFunctions/AggregateFunctionMaxIntersections.h +++ b/src/AggregateFunctions/AggregateFunctionMaxIntersections.h @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/AggregateFunctions/AggregateFunctionMinMaxAny.h b/src/AggregateFunctions/AggregateFunctionMinMaxAny.h index e5471b8a727..189272a7058 100644 --- a/src/AggregateFunctions/AggregateFunctionMinMaxAny.h +++ b/src/AggregateFunctions/AggregateFunctionMinMaxAny.h @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ struct SingleValueDataFixed { private: using Self = SingleValueDataFixed; - using ColVecType = std::conditional_t, ColumnDecimal, ColumnVector>; + using ColVecType = ColumnVectorOrDecimal; bool has_value = false; /// We need to remember if at least one value has been passed. This is necessary for AggregateFunctionIf. T value; diff --git a/src/AggregateFunctions/AggregateFunctionOrFill.cpp b/src/AggregateFunctions/AggregateFunctionOrFill.cpp index 3ba20e65e32..7aee0289879 100644 --- a/src/AggregateFunctions/AggregateFunctionOrFill.cpp +++ b/src/AggregateFunctions/AggregateFunctionOrFill.cpp @@ -23,6 +23,9 @@ private: public: explicit AggregateFunctionCombinatorOrFill(Kind kind_) : kind(kind_) {} + /// Due to aggregate_functions_null_for_empty + bool supportsNesting() const override { return true; } + String getName() const override { return kind == Kind::OrNull ? "OrNull" : "OrDefault"; diff --git a/src/AggregateFunctions/AggregateFunctionQuantile.cpp b/src/AggregateFunctions/AggregateFunctionQuantile.cpp index 11b14585653..5f84eb9b271 100644 --- a/src/AggregateFunctions/AggregateFunctionQuantile.cpp +++ b/src/AggregateFunctions/AggregateFunctionQuantile.cpp @@ -56,6 +56,8 @@ template using FuncQuantilesTDigestWeighted template using FuncQuantileBFloat16 = AggregateFunctionQuantile, NameQuantileBFloat16, false, std::conditional_t, false>; template using FuncQuantilesBFloat16 = AggregateFunctionQuantile, NameQuantilesBFloat16, false, std::conditional_t, true>; +template using FuncQuantileBFloat16Weighted = AggregateFunctionQuantile, NameQuantileBFloat16Weighted, true, std::conditional_t, false>; +template using FuncQuantilesBFloat16Weighted = AggregateFunctionQuantile, NameQuantilesBFloat16Weighted, true, std::conditional_t, true>; template