ClickHouse / ClickHouse/ClickHouse
Multiple ARRAY JOIN (Cartesian Product of Arrays)
- Dominant language
- C++
- Stars
- 49.9k
- Forks
- 9k
- Avg merge
- 21h 32m
- Merged PRs (30d)
- 515
Description
Want to discuss feature described in the issue #8687 , Multiple ARRAY JOIN (Cartesian Product of Arrays)
I am working on the feature described in the issue [#8687](https://github.com/ClickHouse/ClickHouse/issues/8687) , Multiple ARRAY JOIN (Cartesian Product of Arrays) .
I want to have a discussion and get agreement to develop this feature.
I have created Test Cases and Design Doc here:
[Multi Array Join Design Doc](https://github.com/kashwy/ClickHouse-Development/blob/main/develop/Array-Join/Multi_Array_Join_Design.md)
[Multi Array Join Test Cases ](https://github.com/kashwy/ClickHouse-Development/blob/main/develop/Array-Join/Multi_Array_Join_Test_Cases.md)
Any suggestions and comments are welcome
Thanks
My proposed requirements:
# Requirements
The requirements are based on:
- Current behaviour of ARRAY JOIN
- The description of the issue [#8687](https://github.com/ClickHouse/ClickHouse/issues/8687)
- Currently does not consider the requiremets in [#23194](https://github.com/ClickHouse/ClickHouse/issues/23194) ( will apply later)
New feature will not affect the behavior of existing ARRAY JOIN, e.g., one ARRAY JOIN with one column or one ARRAY JOIN with multiple column.
new feature will produce cartesian product of arrays (`arr1 x arr2`):
1. Support multiple INNER ARRAY JOIN with one column, each ARRAY JOIN only has one column. e.g.
```
ARRAY JOIN arr1 ARRAY JOIN arr2
```
2. Support multiple LEFT ARRAY JOIN with one column, each ARRAY JOIN only has one column. e.g.
```
LEFT ARRAY JOIN arr1 LEFT ARRAY JOIN arr2
```
3. Support multiple ARRAY JOIN combined inner and left join with one column, each ARRAY JOIN only has one column. e.g.
```
ARRAY JOIN arr1 LEFT ARRAY JOIN arr2
```
4. Support multiple ARRAY JOIN with one column, and aliases. e.g.
```
ARRAY JOIN arr1 as c1 ARRAY JOIN arr2 as c2
```
5. Support multiple ARRAY JOIN with nested struct, e.g.
```
ARRAY JOIN nested1 ARRAY JOIN nested2
```
6. Support multiple ARRAY JOIN with multiple column, e.g.
```
ARRAY JOIN arr1 ARRAY JOIN arr2, arr3`, will result `arr1 x (arr2 + arr3)
```
Contributor guide
Assessment
This issue has not been assessed yet.