Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arraySymmetricDifference function #62262

Closed
wants to merge 60 commits into from
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
66f9e07
baseline
Mar 29, 2024
ee94372
common logic from intersect to common arrayLogicalFunction adaptive t…
Apr 3, 2024
c748764
tests for arraySymmetricDifference
Apr 3, 2024
3e51700
clean up code and format
Apr 3, 2024
5e37c05
Merge branch 'ClickHouse:master' into master
pheepa Apr 3, 2024
2e36415
nullable result type handling for symmetric difference
Apr 3, 2024
4b6b13a
Merge branch 'ClickHouse:master' into master
pheepa Apr 3, 2024
6fc5a98
sym diff in doc
pheepa Apr 4, 2024
7a015be
no need errors and pragmaonce
pheepa Apr 4, 2024
3f96017
new line for bracets
pheepa Apr 4, 2024
dfd0100
clang-format
pheepa Apr 4, 2024
69fe41b
Merge branch 'ClickHouse:master' into master
pheepa Apr 4, 2024
03e9cf5
- templatized base class
pheepa Apr 5, 2024
f417a63
- some comments
pheepa Apr 6, 2024
e94907f
Merge branch 'ClickHouse:master' into master
pheepa Apr 6, 2024
8e35efc
fix aspell-dict.txt
pheepa Apr 6, 2024
4d3c518
Merge remote-tracking branch 'ch-pheepa/master' into pheepa-master
pheepa Apr 6, 2024
f7b7a98
typo in aspell-dict.txt
pheepa Apr 6, 2024
19a5208
docs in funcs factory
pheepa Apr 6, 2024
75cf255
Cosmetics
rschu1ze Apr 7, 2024
e09a25a
support of [NULL] input and correction of condition to add in sym dif…
pheepa Apr 7, 2024
c893e3b
Merge branch 'ClickHouse:master' into master
pheepa Apr 7, 2024
6aa0045
format
pheepa Apr 7, 2024
20a20ae
Merge remote-tracking branch 'ch-pheepa/master' into pheepa-master
pheepa Apr 7, 2024
396e9f6
Merge branch 'ClickHouse:master' into master
pheepa Apr 8, 2024
a0a0436
Merge branch 'master' into pheepa-master
pheepa Apr 8, 2024
aef610d
Merge remote-tracking branch 'ch-pheepa/master' into pheepa-master
pheepa Apr 8, 2024
56cc92b
Merge branch 'ClickHouse:master' into master
pheepa Apr 8, 2024
476b1d4
Merge branch 'ClickHouse:master' into master
pheepa Apr 9, 2024
2211e01
Merge branch 'ClickHouse:master' into master
pheepa Apr 9, 2024
8806232
Merge branch 'master' into pheepa-master
pheepa Apr 10, 2024
28304a0
emptyArrayString() in fold test
pheepa Apr 10, 2024
5da4e54
Revert "emptyArrayString() in fold test"
rschu1ze Apr 10, 2024
eb157cc
Fix 02415_all_new_functions_must_be_documented
rschu1ze Apr 10, 2024
aacad60
Fix expected results of 03033_arraySymmetricDifference
rschu1ze Apr 10, 2024
3997f2a
baseline
Mar 29, 2024
89c55a5
common logic from intersect to common arrayLogicalFunction adaptive t…
Apr 3, 2024
e40a596
tests for arraySymmetricDifference
Apr 3, 2024
b6e00ca
clean up code and format
Apr 3, 2024
36ab070
nullable result type handling for symmetric difference
Apr 3, 2024
5195f60
sym diff in doc
pheepa Apr 4, 2024
7786d77
no need errors and pragmaonce
pheepa Apr 4, 2024
5d25505
new line for bracets
pheepa Apr 4, 2024
bacf10a
clang-format
pheepa Apr 4, 2024
2a3a83d
- templatized base class
pheepa Apr 5, 2024
cad0565
- some comments
pheepa Apr 6, 2024
244e353
fix aspell-dict.txt
pheepa Apr 6, 2024
150bc60
typo in aspell-dict.txt
pheepa Apr 6, 2024
9020cc8
docs in funcs factory
pheepa Apr 6, 2024
f477f57
Cosmetics
rschu1ze Apr 7, 2024
2573ba2
support of [NULL] input and correction of condition to add in sym dif…
pheepa Apr 7, 2024
6cb5d6d
format
pheepa Apr 7, 2024
89f3d55
emptyArrayString() in fold test
pheepa Apr 10, 2024
5a9f098
Revert "emptyArrayString() in fold test"
rschu1ze Apr 10, 2024
b1621a4
Fix 02415_all_new_functions_must_be_documented
rschu1ze Apr 10, 2024
67144db
Fix expected results of 03033_arraySymmetricDifference
rschu1ze Apr 10, 2024
5dfe267
Merge remote-tracking branch 'ch-pheepa/master' into pheepa-master
pheepa Apr 20, 2024
ace2a9e
context in constructor
pheepa Apr 20, 2024
9790fd8
lint
pheepa Apr 20, 2024
cdc42b5
Merge branch 'master' into master
pheepa Apr 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/en/sql-reference/functions/array-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,24 @@ SELECT
└──────────────┴───────────┘
```

## arraySymmetricDifference(arr)

Takes multiple arrays, returns an array with elements that are presented not in all source arrays.
pheepa marked this conversation as resolved.
Show resolved Hide resolved

Example:

``` sql
SELECT
arraySymmetricDifference([1, 2], [1, 2], [1, 2]) AS no_symmetric_difference
pheepa marked this conversation as resolved.
Show resolved Hide resolved
arraySymmetricDifference([1, 2], [1, 2], [1, 3]) AS symmetric_difference,
```

``` text
┌─no_symmetric_difference─┬─symmetric_difference─┐
│ [] │ [1, 2, 3] │
└─────────────────────────┴──────────────────────┘
```

## arrayJaccardIndex

Returns the [Jaccard index](https://en.wikipedia.org/wiki/Jaccard_index) of two arrays.
Expand Down
Loading
Loading