|
Currently CS use following steps to apply join for tables:
1. Staring from the largest table (largest by rows number);
2. join:
2.1. inner join:
`joinToLargeTable` walk down starting from the root (largest table) using basic DFS and applying join from the bottom up to "parent" node. So this is why CS has check for spanning tree.
2..2 left, right. outer join
`joinTablesInOrder` sorts joins in order `join order` then apply join.
How to add support of circular joins.
1. Walk on graph, find all cycles.
2. Transform edges which makes cycle to filter (need a rule to decide which edge to transform to filter which not), probably we can use something like
` addJoinFilte` to add filter, but not sure currently, need more expertise in this part.
|