Skip to content

Commit 618bb59

Browse files
authored
Merge pull request #3862 from ClickHouse/fix_links
Fix links of array functions
2 parents 9d286f4 + 6f9c987 commit 618bb59

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

docs/getting-started/example-datasets/recipes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Result:
187187
10 rows in set. Elapsed: 0.215 sec. Processed 2.23 million rows, 1.48 GB (10.35 million rows/s., 6.86 GB/s.)
188188
```
189189

190-
In this example, we involve [has](../../sql-reference/functions/array-functions.md#hasarr-elem) function to filter by array elements and sort by the number of directions.
190+
In this example, we involve [has](../../sql-reference/functions/array-functions.md#has) function to filter by array elements and sort by the number of directions.
191191

192192
There is a wedding cake that requires the whole 126 steps to produce! Show that directions:
193193

docs/guides/examples/aggregate_function_combinators/sumArray.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@ same result as `arraySum`.
5151

5252
## See also {#see-also}
5353
- [`sum`](/sql-reference/aggregate-functions/reference/sum)
54-
- [`arraySum`](/sql-reference/functions/array-functions#arraysum)
54+
- [`arraySum`](/sql-reference/functions/array-functions#arraySum)
5555
- [`Array combinator`](/sql-reference/aggregate-functions/combinators#-array)
5656
- [`sumMap`](/examples/aggregate-function-combinators/sumMap)

docs/integrations/data-ingestion/data-formats/json/other.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ FROM s3('https://datasets-documentation.s3.eu-west-3.amazonaws.com/http/document
643643
0 rows in set. Elapsed: 12.121 sec. Processed 10.00 million rows, 107.30 MB (825.01 thousand rows/s., 8.85 MB/s.)
644644
```
645645
646-
Querying this structure requires using the [`indexOf`](/sql-reference/functions/array-functions#indexofarr-x) function to identify the index of the required key (which should be consistent with the order of the values). This can be used to access the values array column i.e. `values[indexOf(keys, 'status')]`. We still require a JSON parsing method for the request column - in this case, `simpleJSONExtractString`.
646+
Querying this structure requires using the [`indexOf`](/sql-reference/functions/array-functions#indexOf) function to identify the index of the required key (which should be consistent with the order of the values). This can be used to access the values array column i.e. `values[indexOf(keys, 'status')]`. We still require a JSON parsing method for the request column - in this case, `simpleJSONExtractString`.
647647
648648
```sql
649649
SELECT toUInt16(values[indexOf(keys, 'status')]) as status,

docs/migrations/bigquery/equivalent-concepts.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,17 @@ Compared to BigQuery's 8 array functions, ClickHouse has over 80 [built-in array
159159

160160
A typical design pattern in ClickHouse is to use the [`groupArray`](/sql-reference/aggregate-functions/reference/grouparray) aggregate function to (temporarily) transform specific row values of a table into an array. This then can be conveniently processed via array functions, and the result can be converted back into individual table rows via [`arrayJoin`](/sql-reference/functions/array-join) aggregate function.
161161

162-
Because ClickHouse SQL supports [higher order lambda functions](/sql-reference/functions/overview#arrow-operator-and-lambda), many advanced array operations can be achieved by simply calling one of the higher order built-in array functions, instead of temporarily converting arrays back to tables, as it is often [required](https://cloud.google.com/bigquery/docs/arrays) in BigQuery, e.g. for [filtering](https://cloud.google.com/bigquery/docs/arrays#filtering_arrays) or [zipping](https://cloud.google.com/bigquery/docs/arrays#zipping_arrays) arrays. In ClickHouse these operations are just a simple function call of the higher order functions [`arrayFilter`](/sql-reference/functions/array-functions#arrayfilterfunc-arr1-), and [`arrayZip`](/sql-reference/functions/array-functions#arrayzip), respectively.
162+
Because ClickHouse SQL supports [higher order lambda functions](/sql-reference/functions/overview#arrow-operator-and-lambda), many advanced array operations can be achieved by simply calling one of the higher order built-in array functions, instead of temporarily converting arrays back to tables, as it is often [required](https://cloud.google.com/bigquery/docs/arrays) in BigQuery, e.g. for [filtering](https://cloud.google.com/bigquery/docs/arrays#filtering_arrays) or [zipping](https://cloud.google.com/bigquery/docs/arrays#zipping_arrays) arrays. In ClickHouse these operations are just a simple function call of the higher order functions [`arrayFilter`](/sql-reference/functions/array-functions#arrayFilter), and [`arrayZip`](/sql-reference/functions/array-functions#arrayZip), respectively.
163163

164164
In the following, we provide a mapping of array operations from BigQuery to ClickHouse:
165165

166166
| BigQuery | ClickHouse |
167167
|----------|------------|
168-
| [ARRAY_CONCAT](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_concat) | [arrayConcat](/sql-reference/functions/array-functions#arrayconcat) |
168+
| [ARRAY_CONCAT](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_concat) | [arrayConcat](/sql-reference/functions/array-functions#arrayConcat) |
169169
| [ARRAY_LENGTH](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_length) | [length](/sql-reference/functions/array-functions#length) |
170-
| [ARRAY_REVERSE](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_reverse) | [arrayReverse](/sql-reference/functions/array-functions#arrayreverse) |
170+
| [ARRAY_REVERSE](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_reverse) | [arrayReverse](/sql-reference/functions/array-functions#arrayReverse) |
171171
| [ARRAY_TO_STRING](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#array_to_string) | [arrayStringConcat](/sql-reference/functions/splitting-merging-functions#arraystringconcat) |
172-
| [GENERATE_ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_array) | [range](/sql-reference/functions/array-functions#rangeend-rangestart--end--step) |
172+
| [GENERATE_ARRAY](https://cloud.google.com/bigquery/docs/reference/standard-sql/array_functions#generate_array) | [range](/sql-reference/functions/array-functions#range) |
173173

174174
**Create an array with one element for each row in a subquery**
175175

@@ -276,7 +276,7 @@ SELECT GENERATE_DATE_ARRAY('2016-10-05', '2016-10-08') AS example;
276276
*--------------------------------------------------*/
277277
```
278278

279-
[range](/sql-reference/functions/array-functions#rangeend-rangestart--end--step) + [arrayMap](/sql-reference/functions/array-functions#arraymapfunc-arr1-) functions
279+
[range](/sql-reference/functions/array-functions#range) + [arrayMap](/sql-reference/functions/array-functions#arrayMap) functions
280280

281281
_ClickHouse_
282282

@@ -307,7 +307,7 @@ SELECT GENERATE_TIMESTAMP_ARRAY('2016-10-05 00:00:00', '2016-10-07 00:00:00',
307307

308308
_ClickHouse_
309309

310-
[range](/sql-reference/functions/array-functions#rangeend-rangestart--end--step) + [arrayMap](/sql-reference/functions/array-functions#arraymapfunc-arr1-) functions
310+
[range](/sql-reference/functions/array-functions#range) + [arrayMap](/sql-reference/functions/array-functions#arrayMap) functions
311311

312312
```sql
313313
SELECT arrayMap(x -> (toDateTime('2016-10-05 00:00:00') + toIntervalDay(x)), range(dateDiff('day', toDateTime('2016-10-05 00:00:00'), toDateTime('2016-10-07 00:00:00')) + 1)) AS timestamp_array
@@ -347,7 +347,7 @@ FROM Sequences;
347347

348348
_ClickHouse_
349349

350-
[arrayFilter](/sql-reference/functions/array-functions#arrayfilterfunc-arr1-) function
350+
[arrayFilter](/sql-reference/functions/array-functions#arrayFilter) function
351351

352352
```sql
353353
WITH Sequences AS
@@ -408,7 +408,7 @@ SELECT
408408

409409
_ClickHouse_
410410

411-
[arrayZip](/sql-reference/functions/array-functions#arrayzip) function
411+
[arrayZip](/sql-reference/functions/array-functions#arrayZip) function
412412

413413
```sql
414414
WITH Combinations AS
@@ -451,7 +451,7 @@ FROM Sequences AS s;
451451

452452
_ClickHouse_
453453

454-
[arraySum](/sql-reference/functions/array-functions#arraysum), [arrayAvg](/sql-reference/functions/array-functions#arrayavg), ... function, or any of the over 90 existing aggregate function names as argument for the [arrayReduce](/sql-reference/functions/array-functions#arrayreduce) function
454+
[arraySum](/sql-reference/functions/array-functions#arraySum), [arrayAvg](/sql-reference/functions/array-functions#arrayAvg), ... function, or any of the over 90 existing aggregate function names as argument for the [arrayReduce](/sql-reference/functions/array-functions#arrayReduce) function
455455

456456
```sql
457457
WITH Sequences AS

0 commit comments

Comments
 (0)