My objective is to construct join graph from a given query.
A join graph, has a node for each relation involved in a join, and an edge between two relations if they share a join predicate among them.
To do this I first tried to use the make_join_rel() function
- There I checked if they root->join->cur->level is 2, just write the relation names to a file.
- But this strategy failed, because if there is somewhere a Cartesian product among two relations, then they can't have an edge in the join graph.
- So, along with writing the relation name, I need to know if they share a join predicate among them or not.