So my question is quite simple, however even though there's a LOT of information about distribution on the internet, I haven't found a single article nor video about HOW exactly chunks of distributed by the same key tables end up on the SAME segments?
Simply put for example I have two tables table1 and table2 in the same database and in the same schema on the greenplum which has lets say 3 segments one for each segment node if it matters. And both of these tables are distributed by the field id.
If i undestand corretly for example if all records with the id=1 from the table1 got into 1st segement, then somehow all records with the id=1 from the table2 would also got into 1st segment? How greenplum "knows" which segment fill with which id?? Why wouldn't all records with id=1 from the second table go to segment 2 or 3? I mean if it is not the case then how local join works anyway?
Thank you beforehand!