From 9c50a2d2454cfa47b97950e93b99b57c2a6cb632 Mon Sep 17 00:00:00 2001 From: alsu Date: Tue, 1 Oct 2024 16:22:50 +0200 Subject: [PATCH 1/4] fix double distinct mistake in docs (corrStableDistinct(DISTINCT x, y)) --- docs/en/sql-reference/aggregate-functions/combinators.md | 2 +- docs/ru/sql-reference/aggregate-functions/combinators.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/sql-reference/aggregate-functions/combinators.md b/docs/en/sql-reference/aggregate-functions/combinators.md index e30aa66b3b3..adbd3724669 100644 --- a/docs/en/sql-reference/aggregate-functions/combinators.md +++ b/docs/en/sql-reference/aggregate-functions/combinators.md @@ -124,7 +124,7 @@ Converts an aggregate function for tables into an aggregate function for arrays ## -Distinct Every unique combination of arguments will be aggregated only once. Repeating values are ignored. -Examples: `sum(DISTINCT x)`, `groupArray(DISTINCT x)`, `corrStableDistinct(DISTINCT x, y)` and so on. +Examples: `sum(DISTINCT x)` (or `sumDistinct(x)`), `groupArray(DISTINCT x)` (or `groupArrayDistinct(x)`), `corrStable(DISTINCT x, y)` (or `corrStableDistinct(x, y)`) and so on. ## -OrDefault diff --git a/docs/ru/sql-reference/aggregate-functions/combinators.md b/docs/ru/sql-reference/aggregate-functions/combinators.md index 99d5f11442c..31770fdd20f 100644 --- a/docs/ru/sql-reference/aggregate-functions/combinators.md +++ b/docs/ru/sql-reference/aggregate-functions/combinators.md @@ -93,7 +93,7 @@ WITH anySimpleState(number) AS c SELECT toTypeName(c), c FROM numbers(1); ## -Distinct {#agg-functions-combinator-distinct} При наличии комбинатора Distinct, каждое уникальное значение аргументов, будет учитано в агрегатной функции только один раз. -Примеры: `sum(DISTINCT x)`, `groupArray(DISTINCT x)`, `corrStableDistinct(DISTINCT x, y)` и т.п. +Примеры: `sum(DISTINCT x)` (или `sumDistinct(x)`), `groupArray(DISTINCT x)` (или `groupArrayDistinct(x)`), `corrStable(DISTINCT x, y)` (или `corrStableDistinct(x, y)`) и т.п. ## -OrDefault {#agg-functions-combinator-ordefault} From 9d4d22ae45441ee2ab3abf09694218e424aa9c12 Mon Sep 17 00:00:00 2001 From: alsu Date: Tue, 1 Oct 2024 16:44:13 +0200 Subject: [PATCH 2/4] fix some typos --- .../en/sql-reference/data-types/data-types-binary-encoding.md | 4 ++-- docs/en/sql-reference/statements/alter/view.md | 2 +- docs/en/sql-reference/statements/check-table.md | 2 +- docs/en/sql-reference/statements/create/table.md | 2 +- docs/en/sql-reference/statements/create/view.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/sql-reference/data-types/data-types-binary-encoding.md b/docs/en/sql-reference/data-types/data-types-binary-encoding.md index 08fb664126a..a0497bc8474 100644 --- a/docs/en/sql-reference/data-types/data-types-binary-encoding.md +++ b/docs/en/sql-reference/data-types/data-types-binary-encoding.md @@ -86,7 +86,7 @@ The table below describes how different interval kinds of `Interval` data type a ### Aggregate function parameter binary encoding -The table below describes how parameters of `AggragateFunction` and `SimpleAggregateFunction` are encoded. +The table below describes how parameters of `AggregateFunction` and `SimpleAggregateFunction` are encoded. The encoding of a parameter consists of 1 byte indicating the type of the parameter and the value itself. | Parameter type | Binary encoding | @@ -106,7 +106,7 @@ The encoding of a parameter consists of 1 byte indicating the type of the parame | `String` | `0x0C` | | `Array` | `0x0D...` | | `Tuple` | `0x0E...` | -| `Map` | `0x0F...` | +| `Map` | `0x0F...` | | `IPv4` | `0x10` | | `IPv6` | `0x11` | | `UUID` | `0x12` | diff --git a/docs/en/sql-reference/statements/alter/view.md b/docs/en/sql-reference/statements/alter/view.md index 5f3dae0a9c0..c15de9d528c 100644 --- a/docs/en/sql-reference/statements/alter/view.md +++ b/docs/en/sql-reference/statements/alter/view.md @@ -41,7 +41,7 @@ ORDER BY ts, event_type; │ 2020-01-02 00:00:00 │ imp │ 2 │ └─────────────────────┴────────────┴─────────────────┘ --- Let's add the new measurment `cost` +-- Let's add the new measurement `cost` -- and the new dimension `browser`. ALTER TABLE events diff --git a/docs/en/sql-reference/statements/check-table.md b/docs/en/sql-reference/statements/check-table.md index 77d0bc22ee0..4a7406aa5e1 100644 --- a/docs/en/sql-reference/statements/check-table.md +++ b/docs/en/sql-reference/statements/check-table.md @@ -46,7 +46,7 @@ The `CHECK TABLE` query supports the following table engines: - [StripeLog](../../engines/table-engines/log-family/stripelog.md) - [MergeTree family](../../engines/table-engines/mergetree-family/mergetree.md) -Performed over the tables with another table engines causes an `NOT_IMPLEMETED` exception. +Performed over the tables with another table engines causes an `NOT_IMPLEMENTED` exception. Engines from the `*Log` family do not provide automatic data recovery on failure. Use the `CHECK TABLE` query to track data loss in a timely manner. diff --git a/docs/en/sql-reference/statements/create/table.md b/docs/en/sql-reference/statements/create/table.md index 7428e6cd6ca..6acb0a905db 100644 --- a/docs/en/sql-reference/statements/create/table.md +++ b/docs/en/sql-reference/statements/create/table.md @@ -429,7 +429,7 @@ DEFLATE_QPL is not available in ClickHouse Cloud. ### Specialized Codecs -These codecs are designed to make compression more effective by exploiting specific features of the data. Some of these codecs do not compress data themself, they instead preprocess the data such that a second compression stage using a general-purpose codec can achieve a higher data compression rate. +These codecs are designed to make compression more effective by exploiting specific features of the data. Some of these codecs do not compress data themselves, they instead preprocess the data such that a second compression stage using a general-purpose codec can achieve a higher data compression rate. #### Delta diff --git a/docs/en/sql-reference/statements/create/view.md b/docs/en/sql-reference/statements/create/view.md index 9d94f040648..50cfd6ff7b8 100644 --- a/docs/en/sql-reference/statements/create/view.md +++ b/docs/en/sql-reference/statements/create/view.md @@ -202,7 +202,7 @@ REFRESH EVERY 1 MONTH OFFSET 5 DAY 2 HOUR -- on 6th day of every month, at 2:00 REFRESH EVERY 2 WEEK OFFSET 5 DAY 15 HOUR 10 MINUTE -- every other Saturday, at 3:10 pm REFRESH EVERY 30 MINUTE -- at 00:00, 00:30, 01:00, 01:30, etc REFRESH AFTER 30 MINUTE -- 30 minutes after the previous refresh completes, no alignment with time of day --- REFRESH AFTER 1 HOUR OFFSET 1 MINUTE -- syntax errror, OFFSET is not allowed with AFTER +-- REFRESH AFTER 1 HOUR OFFSET 1 MINUTE -- syntax error, OFFSET is not allowed with AFTER ``` `RANDOMIZE FOR` randomly adjusts the time of each refresh, e.g.: From d680e52d00ed532396ec48f1666a370be0c687aa Mon Sep 17 00:00:00 2001 From: alsu Date: Fri, 4 Oct 2024 16:10:06 +0200 Subject: [PATCH 3/4] fix some typos --- docs/en/development/continuous-integration.md | 2 +- docs/en/engines/table-engines/mergetree-family/mergetree.md | 6 +++--- docs/en/engines/table-engines/special/keepermap.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/development/continuous-integration.md b/docs/en/development/continuous-integration.md index c283cfbf4c2..ef487d16d73 100644 --- a/docs/en/development/continuous-integration.md +++ b/docs/en/development/continuous-integration.md @@ -82,7 +82,7 @@ cd ./utils/check-style # Check duplicate includes ./check-duplicate-includes.sh -# Check c++ formatiing +# Check c++ formatting ./check-style # Check python formatting with black diff --git a/docs/en/engines/table-engines/mergetree-family/mergetree.md b/docs/en/engines/table-engines/mergetree-family/mergetree.md index be3fe797922..cd2fc69c236 100644 --- a/docs/en/engines/table-engines/mergetree-family/mergetree.md +++ b/docs/en/engines/table-engines/mergetree-family/mergetree.md @@ -374,15 +374,15 @@ Users can create [UDF](/docs/en/sql-reference/statements/create/function.md) to ```sql CREATE FUNCTION bfEstimateFunctions [ON CLUSTER cluster] AS -(total_nubmer_of_all_grams, size_of_bloom_filter_in_bits) -> round((size_of_bloom_filter_in_bits / total_nubmer_of_all_grams) * log(2)); +(total_number_of_all_grams, size_of_bloom_filter_in_bits) -> round((size_of_bloom_filter_in_bits / total_number_of_all_grams) * log(2)); CREATE FUNCTION bfEstimateBmSize [ON CLUSTER cluster] AS -(total_nubmer_of_all_grams, probability_of_false_positives) -> ceil((total_nubmer_of_all_grams * log(probability_of_false_positives)) / log(1 / pow(2, log(2)))); +(total_number_of_all_grams, probability_of_false_positives) -> ceil((total_number_of_all_grams * log(probability_of_false_positives)) / log(1 / pow(2, log(2)))); CREATE FUNCTION bfEstimateFalsePositive [ON CLUSTER cluster] AS -(total_nubmer_of_all_grams, number_of_hash_functions, size_of_bloom_filter_in_bytes) -> pow(1 - exp(-number_of_hash_functions/ (size_of_bloom_filter_in_bytes / total_nubmer_of_all_grams)), number_of_hash_functions); +(total_number_of_all_grams, number_of_hash_functions, size_of_bloom_filter_in_bytes) -> pow(1 - exp(-number_of_hash_functions/ (size_of_bloom_filter_in_bytes / total_number_of_all_grams)), number_of_hash_functions); CREATE FUNCTION bfEstimateGramNumber [ON CLUSTER cluster] AS diff --git a/docs/en/engines/table-engines/special/keepermap.md b/docs/en/engines/table-engines/special/keepermap.md index 04a9a4b0d4e..d1ba5950911 100644 --- a/docs/en/engines/table-engines/special/keepermap.md +++ b/docs/en/engines/table-engines/special/keepermap.md @@ -35,7 +35,7 @@ Engine parameters: - `root_path` - ZooKeeper path where the `table_name` will be stored. This path should not contain the prefix defined by `` config because the prefix will be automatically appended to the `root_path`. -Additionally, format of `auxiliary_zookeper_cluster_name:/some/path` is also supported where `auxiliary_zookeper_cluster` is a ZooKeeper cluster defined inside `` config. +Additionally, format of `auxiliary_zookeeper_cluster_name:/some/path` is also supported where `auxiliary_zookeeper_cluster` is a ZooKeeper cluster defined inside `` config. By default, ZooKeeper cluster defined inside `` config is used. - `keys_limit` - number of keys allowed inside the table. This limit is a soft limit and it can be possible that more keys will end up in the table for some edge cases. From 0ad512c6e351d125f6b249e8b0f70c7483574da5 Mon Sep 17 00:00:00 2001 From: alsu Date: Fri, 4 Oct 2024 17:10:03 +0200 Subject: [PATCH 4/4] fix typos --- docs/en/interfaces/formats.md | 2 +- docs/en/interfaces/schema-inference.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/en/interfaces/formats.md b/docs/en/interfaces/formats.md index ae41ec1ab2d..6c59c88fa95 100644 --- a/docs/en/interfaces/formats.md +++ b/docs/en/interfaces/formats.md @@ -877,7 +877,7 @@ INSERT INTO json_as_object (json) FORMAT JSONAsObject {"any json stucture":1} SELECT time, json FROM json_as_object FORMAT JSONEachRow ``` -```resonse +```response {"time":"2024-09-16 12:18:10","json":{}} {"time":"2024-09-16 12:18:13","json":{"any json stucture":"1"}} {"time":"2024-09-16 12:18:08","json":{"foo":{"bar":{"x":"y"},"baz":"1"}}} diff --git a/docs/en/interfaces/schema-inference.md b/docs/en/interfaces/schema-inference.md index a2d96c078e8..5dec768ca4e 100644 --- a/docs/en/interfaces/schema-inference.md +++ b/docs/en/interfaces/schema-inference.md @@ -509,7 +509,7 @@ DESC format(JSONEachRow, $$ {"value" : "424242424242"} $$) ``` -```reponse +```response ┌─name──┬─type────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐ │ value │ Nullable(Int64) │ │ │ │ │ │ └───────┴─────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘ @@ -910,9 +910,9 @@ This setting is disabled by default. ```sql SET input_format_json_try_infer_numbers_from_strings = 1; -DESC format(CSV, '"42","42.42"'); +DESC format(CSV, '42,42.42'); ``` -```reponse +```response ┌─name─┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐ │ c1 │ Nullable(Int64) │ │ │ │ │ │ │ c2 │ Nullable(Float64) │ │ │ │ │ │