Yes, of course!
Here is an excerpt from some internal documentation, as yet unpublished. Please let me know if this makes sense.
What happens if there are loops (cycles) in the graph?
Table t1 has a left join relationship with table t2, and an inner join relationship with table t3.
Table t2 and t3 also have an inner join relationship.
This loop is allowed to exist in a bipp dataset. But once a set of columns has been selected and the auto-SQL generator has been invoked, loops are not allowed.
For example, if a column is selected from t1 and another from t2, the auto-generated SQL will use the left join, ignoring the other two join relationships. But if a column is selected from each of the three tables, then we have a problem. To join three tables, you need two JOIN rules. In this case, any two JOIN rules out of the three would have sufficed. Since there is no a priori reason to ignore a specific JOIN rule over another, bipp’s auto-SQL generator will issue an error message.
If columns are chosen from t1 and t2, we have a problem (run-time error).
If columns are chosen from t1, t2 and t3, there is no problem because we can ignore the join relationships involving t4.
In order to precisely explain the underlying algorithm, we define a path to be compact if it only includes tables that are selected. For example, if t1 and t2 are selected, the path
t1 - t3 - t2
is not compact.
The auto-SQL generator will complain about loops (“multiple paths”) if the following condition is violated:
- either exactly one compact tree exists
- or there are no compact trees and exactly one non-compact tree