Skip to content

Commit 9f80ca6

Browse files
committed
Fix style check
1 parent f7c689a commit 9f80ca6

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

src/Functions/array/arrayIntersect.cpp

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -766,18 +766,16 @@ using ArraySymmetricDifference = FunctionArrayIntersect<ArrayModeSymmetricDiffer
766766

767767
REGISTER_FUNCTION(ArrayIntersect)
768768
{
769-
770-
FunctionDocumentation::Description intersect_description = "Takes multiple arrays and returns an array with elements which are present in **all** source arrays. The result contains only unique values.";
769+
FunctionDocumentation::Description intersect_description = "Takes multiple arrays and returns an array with elements which are present in **all** source arrays. The result contains only unique values.";
771770
FunctionDocumentation::Syntax intersect_syntax = "arrayIntersect(x, x1, ..., xN)";
772-
FunctionDocumentation::Arguments intersect_argument = {
773-
{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."},
774-
};
771+
FunctionDocumentation::Arguments intersect_argument = {{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."}};
775772
FunctionDocumentation::ReturnedValue intersect_returned_value = "Returns an array with distinct elements that are present in all N arrays. [`Array`](/sql-reference/data-types/array).";
776-
FunctionDocumentation::Examples intersect_example = {{"Usage example", R"(
773+
FunctionDocumentation::Examples intersect_example = {{"Usage example",
774+
R"(
777775
SELECT
778776
arrayIntersect([1, 2], [1, 3], [2, 3]) AS empty_intersection,
779777
arrayIntersect([1, 2], [1, 3], [1, 4]) AS non_empty_intersection
780-
)", R"(
778+
)", R"(
781779
┌─non_empty_intersection─┬─empty_intersection─┐
782780
│ [] │ [1] │
783781
└────────────────────────┴────────────────────┘
@@ -791,22 +789,22 @@ arrayIntersect([1, 2], [1, 3], [1, 4]) AS non_empty_intersection
791789
FunctionDocumentation::Description union_description = R"(
792790
Takes multiple arrays and returns an array which contains all elements that are present in one of the source arrays.
793791
The result contains only unique values.
794-
)";
792+
)";
795793
FunctionDocumentation::Syntax union_syntax = "arrayUnion(x1, x2, ..., xN)";
796-
FunctionDocumentation::Arguments union_argument = {
797-
{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."}
798-
};
794+
FunctionDocumentation::Arguments union_argument = {{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."}};
799795
FunctionDocumentation::ReturnedValue union_returned_value = "Returns an array with distinct elements from the source arrays. [`Array`](/sql-reference/data-types/array).";
800-
FunctionDocumentation::Examples union_example = {{"Usage example", R"(
796+
FunctionDocumentation::Examples union_example = {{"Usage example",
797+
R"(
801798
SELECT
802799
arrayUnion([-2, 1], [10, 1], [-2], []) as num_example,
803800
arrayUnion(['hi'], [], ['hello', 'hi']) as str_example,
804801
arrayUnion([1, 3, NULL], [2, 3, NULL]) as null_example
805-
)", R"(
802+
)",
803+
R"(
806804
┌─num_example─┬─str_example────┬─null_example─┐
807805
│ [10,-2,1] │ ['hello','hi'] │ [3,2,1,NULL] │
808806
└─────────────┴────────────────┴──────────────┘
809-
)"}};
807+
)"}};
810808
FunctionDocumentation::IntroducedIn union_introduced_in = {24, 10};
811809
FunctionDocumentation::Category union_category = FunctionDocumentation::Category::Array;
812810
FunctionDocumentation union_documentation = {union_description, union_syntax, union_argument, union_returned_value, union_example, union_introduced_in, union_category};
@@ -821,21 +819,20 @@ The symmetric difference of _more than two sets_ is [mathematically defined](htt
821819
as the set of all input elements which occur in an odd number of input sets.
822820
In contrast, function `arraySymmetricDifference` simply returns the set of input elements which do not occur in all input sets.
823821
:::
824-
)";
822+
)";
825823
FunctionDocumentation::Syntax symdiff_syntax = "arraySymmetricDifference(x1, x2, ..., xN)";
826-
FunctionDocumentation::Arguments symdiff_argument = {
827-
{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."}
828-
};
824+
FunctionDocumentation::Arguments symdiff_argument = {{"xN", "N arrays from which to make the new array. [`Array`](/sql-reference/data-types/array)."}};
829825
FunctionDocumentation::ReturnedValue symdiff_returned_value = "Returns an array distinct elements not present in all source arrays. [`Array`](/sql-reference/data-types/array).";
830826
FunctionDocumentation::Examples symdiff_example = {{"Usage example", R"(
831827
SELECT
832828
arraySymmetricDifference([1, 2], [1, 2], [1, 2]) AS empty_symmetric_difference,
833829
arraySymmetricDifference([1, 2], [1, 2], [1, 3]) AS non_empty_symmetric_difference;
834-
)", R"(
830+
)",
831+
R"(
835832
┌─empty_symmetric_difference─┬─non_empty_symmetric_difference─┐
836833
│ [] │ [3] │
837834
└────────────────────────────┴────────────────────────────────┘
838-
)"}};
835+
)"}};
839836
FunctionDocumentation::IntroducedIn symdiff_introduced_in = {25, 4};
840837
FunctionDocumentation::Category symdiff_category = FunctionDocumentation::Category::Array;
841838
FunctionDocumentation symdiff_documentation = {symdiff_description, symdiff_syntax, symdiff_argument, symdiff_returned_value, symdiff_example, symdiff_introduced_in, symdiff_category};

src/Functions/array/arrayUniq.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ void FunctionArrayUniq::executeHashed(
319319

320320
REGISTER_FUNCTION(ArrayUniq)
321321
{
322-
FunctionDocumentation::Description description = R"(
322+
FunctionDocumentation::Description description = R"(
323323
For a single argument passed, counts the number of different elements in the array.
324324
325325
For multiple arguments passed, it counts the number of different **tuples** made of elements at matching positions across multiple arrays.
@@ -333,15 +333,15 @@ It will then count the number of unique tuples. In this case `2`.
333333
:::tip
334334
If you want to get a list of unique items in an array, you can use `arrayReduce('groupUniqArray', arr)`.
335335
:::
336-
)";
337-
FunctionDocumentation::Syntax syntax = "arrayUniq(x[, ...yN])";
336+
)";
337+
FunctionDocumentation::Syntax syntax = "arrayUniq(x[, ...yN])";
338338
FunctionDocumentation::Arguments arguments = {
339-
{"x", "Array for which to count the number of unique elements. [`Array`](/sql-reference/data-types/array)."},
340-
{"...yN (optional)", "Additional same-size arrays used to count the number of unique tuples of elements at corresponding positions in multiple arrays. [`Array`](/sql-reference/data-types/array)."}
339+
{"x", "Array for which to count the number of unique elements. [`Array`](/sql-reference/data-types/array)."},
340+
{"...yN (optional)", "Additional same-size arrays used to count the number of unique tuples of elements at corresponding positions in multiple arrays. [`Array`](/sql-reference/data-types/array)."}
341341
};
342-
FunctionDocumentation::ReturnedValue returned_value = "For a single arguments returns the number of unique elements. For multiple arguments returns the number of unique tuples made from elements at corresponding positions across the arrays. [`UInt32`](/sql-reference/data-types/int-uint)";
342+
FunctionDocumentation::ReturnedValue returned_value = "For a single arguments returns the number of unique elements. For multiple arguments returns the number of unique tuples made from elements at corresponding positions across the arrays. [`UInt32`](/sql-reference/data-types/int-uint)";
343343
FunctionDocumentation::Examples examples = {
344-
{"Single argument", "SELECT arrayUniq([1,1,2,2])", "2"},
344+
{"Single argument", "SELECT arrayUniq([1,1,2,2])", "2"},
345345
{"Multiple argument", "SELECT arrayUniq([1,2,3], [4,5,6])", "3"}
346346
};
347347
FunctionDocumentation::IntroducedIn introduced_in = {1, 1};

0 commit comments

Comments
 (0)