Skip to content

Commit aeeb45c

Browse files
committed
Incorporate review feedback
1 parent 33c12bb commit aeeb45c

File tree

9 files changed

+71
-71
lines changed

9 files changed

+71
-71
lines changed

src/Functions/array/arrayAggregation.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -451,11 +451,11 @@ Returns the minimum element in the source array.
451451
452452
If a lambda function `func` is specified, returns the minimum element of the lambda results.
453453
)";
454-
FunctionDocumentation::Syntax syntax_min = "arrayMin([func(x[, y1, ..., yN])], source[, cond1, ... , condN])";
454+
FunctionDocumentation::Syntax syntax_min = "arrayMin([func(x[, y1, ..., yN])], source_arr[, cond1_arr, ... , condN_arr])";
455455
FunctionDocumentation::Arguments arguments_min = {
456456
{"func(x[, y1, ..., yN])", "Optional. A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
457-
{"source", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
458-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
457+
{"source_arr", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
458+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
459459
};
460460
FunctionDocumentation::ReturnedValue returned_value_min = "Returns the minimum element in the source array, or the minimum element of the lambda results if provided.";
461461
FunctionDocumentation::Examples examples_min = {
@@ -473,11 +473,11 @@ Returns the maximum element in the source array.
473473
474474
If a lambda function `func` is specified, returns the maximum element of the lambda results.
475475
)";
476-
FunctionDocumentation::Syntax syntax_max = "arrayMax([func(x[, y1, ..., yN])], source[, cond1, ... , condN])";
476+
FunctionDocumentation::Syntax syntax_max = "arrayMax([func(x[, y1, ..., yN])], source_arr[, cond1_arr, ... , condN_arr])";
477477
FunctionDocumentation::Arguments arguments_max = {
478478
{"func(x[, y1, ..., yN])", "Optional. A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
479-
{"source", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
480-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
479+
{"source_arr", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
480+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
481481
};
482482
FunctionDocumentation::ReturnedValue returned_value_max = "Returns the maximum element in the source array, or the minimum element of the lambda results if provided.";
483483
FunctionDocumentation::Examples examples_max = {
@@ -495,11 +495,11 @@ Returns the sum of elements in the source array.
495495
496496
If a lambda function `func` is specified, returns the sum of elements of the lambda results.
497497
)";
498-
FunctionDocumentation::Syntax syntax_sum = "arrayMax([func(x[, y1, ..., yN])], source[, cond1, ... , condN])";
498+
FunctionDocumentation::Syntax syntax_sum = "arrayMax([func(x[, y1, ..., yN])], source_arr[, cond1_arr, ... , condN_arr])";
499499
FunctionDocumentation::Arguments arguments_sum = {
500500
{"func(x[, y1, ..., yN])", "Optional. A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
501-
{"source", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
502-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
501+
{"source_arr", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
502+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
503503
};
504504
FunctionDocumentation::ReturnedValue returned_value_sum = "Returns the sum of elements in the source array, or the sum of elements of the lambda results if provided.";
505505
FunctionDocumentation::Examples examples_sum = {
@@ -517,11 +517,11 @@ Returns the average of elements in the source array.
517517
518518
If a lambda function `func` is specified, returns the average of elements of the lambda results.
519519
)";
520-
FunctionDocumentation::Syntax syntax_avg = "arrayAvg([func(x[, y1, ..., yN])], source[, cond1, ... , condN])";
520+
FunctionDocumentation::Syntax syntax_avg = "arrayAvg([func(x[, y1, ..., yN])], source_arr[, cond1_arr, ... , condN_arr])";
521521
FunctionDocumentation::Arguments arguments_avg = {
522522
{"func(x[, y1, ..., yN])", "Optional. A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
523-
{"source", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
524-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
523+
{"source_arr", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
524+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
525525
};
526526
FunctionDocumentation::ReturnedValue returned_value_avg = "Returns the average of elements in the source array, or the average of elements of the lambda results if provided. [`Float64`](/sql-reference/data-types/float).";
527527
FunctionDocumentation::Examples examples_avg = {
@@ -539,11 +539,11 @@ Returns the product of elements in the source array.
539539
540540
If a lambda function `func` is specified, returns the product of elements of the lambda results.
541541
)";
542-
FunctionDocumentation::Syntax syntax_prod = "arrayProduct([func(x[, y1, ..., yN])], source[, cond1, ... , condN])";
542+
FunctionDocumentation::Syntax syntax_prod = "arrayProduct([func(x[, y1, ..., yN])], source_arr[, cond1_arr, ... , condN_arr])";
543543
FunctionDocumentation::Arguments arguments_prod = {
544544
{"func(x[, y1, ..., yN])", "Optional. A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
545-
{"source", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
546-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
545+
{"source_arr", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
546+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
547547
};
548548
FunctionDocumentation::ReturnedValue returned_value_prod = "Returns the product of elements in the source array, or the product of elements of the lambda results if provided. [`Float64`](/sql-reference/data-types/float).";
549549
FunctionDocumentation::Examples examples_prod = {

src/Functions/array/arrayAll.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ ColumnPtr ArrayAllImpl::execute(const ColumnArray & array, ColumnPtr mapped)
6464
REGISTER_FUNCTION(ArrayAll)
6565
{
6666
FunctionDocumentation::Description description = R"(
67-
Returns `1` if lambda `func(x [, y1, y2, ... yN])` returns something other than `0` for all elements. Otherwise, it returns `0`.
67+
Returns `1` if lambda `func(x [, y1, y2, ... yN])` returns true for all elements. Otherwise, it returns `0`.
6868
)";
69-
FunctionDocumentation::Syntax syntax = "arrayAll(func(x[, y1, ..., yN]), source[, cond1, ... , condN])";
69+
FunctionDocumentation::Syntax syntax = "arrayAll(func(x[, y1, ..., yN]), source_arr[, cond1_arr, ... , condN_arr])";
7070
FunctionDocumentation::Arguments arguments = {
7171
{"func(x[, y1, ..., yN])", "A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
72-
{"source", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
73-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."}
72+
{"source_arr", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
73+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."}
7474
};
7575
FunctionDocumentation::ReturnedValue returned_value = "Returns `1` if the lambda function returns true for all elements, `0` otherwise. [`UInt8`](/sql-reference/data-types/int-uint).";
7676
FunctionDocumentation::Examples examples = {

src/Functions/array/arrayCount.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ using FunctionArrayCount = FunctionArrayMapped<ArrayCountImpl, NameArrayCount>;
8282
REGISTER_FUNCTION(ArrayCount)
8383
{
8484
FunctionDocumentation::Description description = R"(
85-
Returns the number of elements for which `func(arr1[i], ..., arrN[i])` returns something other than `0`.
85+
Returns the number of elements for which `func(arr1[i], ..., arrN[i])` returns true.
8686
If `func` is not specified, it returns the number of non-zero elements in the array.
8787
8888
`arrayCount` is a [higher-order function](/sql-reference/functions/overview#higher-order-functions).
@@ -92,7 +92,7 @@ If `func` is not specified, it returns the number of non-zero elements in the ar
9292
{"func", "Function to apply to each element of the array(s). Optional. [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)"},
9393
{"arr1, ..., arrN", "N arrays. [Array(T)](/sql-reference/data-types/array)."},
9494
};
95-
FunctionDocumentation::ReturnedValue returned_value = "Returns the number of elements for which `func` returns something other than `0`. Otherwise, returns the number of non-zero elements in the array.";
95+
FunctionDocumentation::ReturnedValue returned_value = "Returns the number of elements for which `func` returns true. Otherwise, returns the number of non-zero elements in the array.";
9696
FunctionDocumentation::Examples example = {{"Usage example", "SELECT arrayCount(x -> (x % 2), groupArray(number) FROM numbers(10)", "5"}};
9797
FunctionDocumentation::IntroducedIn introduced_in = {1, 1};
9898
FunctionDocumentation::Category category = FunctionDocumentation::Category::Array;

src/Functions/array/arrayExists.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ REGISTER_FUNCTION(ArrayExists)
6767
FunctionDocumentation::Description description = R"(
6868
Returns `1` if there is at least one element in a source array for which `func(x[, y1, y2, ... yN])` returns true. Otherwise, it returns `0`.
6969
)";
70-
FunctionDocumentation::Syntax syntax = "arrayExists(func(x[, y1, ..., yN]), source[, cond1, ... , condN])";
70+
FunctionDocumentation::Syntax syntax = "arrayExists(func(x[, y1, ..., yN]), source_arr[, cond1_arr, ... , condN_arr])";
7171
FunctionDocumentation::Arguments arguments = {
7272
{"func(x[, y1, ..., yN])", "A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
73-
{"source", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
74-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."}
73+
{"source_arr", "The source array to process. [`Array(T)`](/sql-reference/data-types/array)."},
74+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."}
7575
};
7676
FunctionDocumentation::ReturnedValue returned_value = "Returns `1` if the lambda function returns true for at least one element, `0` otherwise. [`UInt8`](/sql-reference/data-types/int-uint).";
7777
FunctionDocumentation::Examples examples = {{"Usage example", "SELECT arrayExists(x, y -> x=y, [1, 2, 3], [0, 0, 0])", "0"}};

src/Functions/array/arrayFill.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@ position i, the function replaces that element with the element at position i-1
136136
from the current state of the array. The first element is always preserved
137137
regardless of any condition.
138138
)";
139-
FunctionDocumentation::Syntax syntax = "arrayFill(func(x [, y1, ..., yN]), source [, cond1, ... , condN])";
139+
FunctionDocumentation::Syntax syntax = "arrayFill(func(x [, y1, ..., yN]), source_arr[, cond1_arr, ... , condN_arr])";
140140
FunctionDocumentation::Arguments arguments = {
141141
{"func(x [, y1, ..., yN])", "A lambda function `func(x [, y1, y2, ... yN]) → F(x [, y1, y2, ... yN])` which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
142-
{"source", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
143-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
142+
{"source_arr", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
143+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
144144
};
145145
FunctionDocumentation::ReturnedValue returned_value = "Returns an array. [`Array(T)`](/sql-reference/data-types/array).";
146146
FunctionDocumentation::Examples examples = {
@@ -161,11 +161,11 @@ position i, the function replaces that element with the element at position i+1
161161
from the current state of the array. The last element is always preserved
162162
regardless of any condition.
163163
)";
164-
FunctionDocumentation::Syntax syntax_reverse = "arrayReverseFill(func(x[, y1, ..., yN]), source[, cond1, ... , condN])";
164+
FunctionDocumentation::Syntax syntax_reverse = "arrayReverseFill(func(x[, y1, ..., yN]), source_arr[, cond1_arr, ... , condN_arr])";
165165
FunctionDocumentation::Arguments arguments_reverse = {
166166
{"func(x[, y1, ..., yN])", "A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
167-
{"source", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
168-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
167+
{"source_arr", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
168+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
169169
};
170170
FunctionDocumentation::ReturnedValue returned_value_reverse = "Returns an array with elements of the source array replaced by the results of the lambda. [`Array(T)`](/sql-reference/data-types/array).";
171171
FunctionDocumentation::Examples examples_reverse = {

src/Functions/array/arrayFilter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ ColumnPtr ArrayFilterImpl::execute(const ColumnArray & array, ColumnPtr mapped)
4949

5050
REGISTER_FUNCTION(ArrayFilter)
5151
{
52-
FunctionDocumentation::Description description = "Returns an array containing only the elements in the source array for which a lambda function returns something other than `0`.";
53-
FunctionDocumentation::Syntax syntax = "arrayFilter(func(x[, y1, ..., yN]), source[, cond1, ... , condN])]";
52+
FunctionDocumentation::Description description = "Returns an array containing only the elements in the source array for which a lambda function returns true.";
53+
FunctionDocumentation::Syntax syntax = "arrayFilter(func(x[, y1, ..., yN]), source_arr[, cond1_arr, ... , condN_arr])]";
5454
FunctionDocumentation::Arguments arguments = {
5555
{"func(x[, y1, ..., yN])", "A lambda function which operates on elements of the source array (`x`) and condition arrays (`y`). [Lambda function](/sql-reference/functions/overview#arrow-operator-and-lambda)."},
56-
{"source", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
57-
{"[, cond1, ... , condN]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
56+
{"source_arr", "The source array to process [`Array(T)`](/sql-reference/data-types/array)."},
57+
{"[, cond1_arr, ... , condN_arr]", "Optional. N condition arrays providing additional arguments to the lambda function. [`Array(T)`](/sql-reference/data-types/array)."},
5858
};
5959
FunctionDocumentation::ReturnedValue returned_value = "Returns a subset of the source array. [`Array(T)`](/sql-reference/data-types/array).";
6060
FunctionDocumentation::Examples examples = {

0 commit comments

Comments
 (0)