citusdata / citus_docs

Documentation for Citus. Distributed PostgreSQL as an extension.
Creative Commons Attribution 4.0 International
58 stars 59 forks source link

Improvise repartition join section #1036

Open ghost opened 2 years ago

ghost commented 2 years ago

https://docs.citusdata.com/en/v10.2/develop/reference_sql.html#repartition-joins

From this link it suggests that we support join on two tables on columns other than the distribution column. But we support only simple joins (and not complex joins, such as outer joins). Outer joins are not supported, and it's documented here https://docs.citusdata.com/en/v10.2/develop/reference_workarounds.html#sql-support-and-workarounds.

We should add a note in the first link to avoid any ambiguity.

SELECT from table_1 p join table_2 s on s.id = p.from_id; <<< supported SELECT from table_1 p left join table_2 s on s.id = p.from_id; <<< not supported ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns.