Skip to content

Commit

Permalink
IGNITE-22875 Added limitations for colocated joins (#11459)
Browse files Browse the repository at this point in the history
  • Loading branch information
IgGusev authored Aug 1, 2024
1 parent f06c148 commit 47a09b3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/_docs/SQL/distributed-joins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ The following image illustrates the procedure of executing a colocated join. A c

image::images/collocated_joins.png[]

=== Limitations

Collocation joins have the following known limitations:

==== OUTER JOIN and REPLICATED Tables

There is currently a limitation in Ignite's support of `OUTER JOIN`. Given a `REPLICATED` table `R`
and a `PARTITIONED` table `P`, the following queries may not work correctly out-of-the-box and require special handling:

- `SELECT * FROM R LEFT JOIN P ON R.X = P.X`
- `SELECT * FROM P RIGHT JOIN R ON P.X = R.X`

To work around the limitation, the following setup is required:

- `P` and `R` need to have equal affinity functions (specifically, the same number of partitions);
- Caches for both `P` and `R` need to have equal or default node filter;
- The join columns `R.X` and `P.X` must be the affinity keys of both tables;
note that unlike most cases this operation requires the `REPLICATED` table to have a specific affinity key;
- Non-collocated joins must be turned off (`setDistributedJoins(false)`).

If all of the above is true, then the JOIN can be performed correctly.

== Non-colocated Joins

Expand Down

0 comments on commit 47a09b3

Please sign in to comment.