[This is preliminary documentation and subject to change.]
The output is a unique table if both inputs are unique tables; otherwise, it is a table.
The rows in R are specified as follows:
The output R is a table in general; it is a unique table (1) for inner join and all outer joins, if both inputs are unique tables, (2) for left semi-join and left anti-semi-join, if the left input is a unique table, and (3) for right semi-join and right anti-semi-join, if the right input is a unique table.
Given table A with 2 occurrences of row X and table B with 1 occurrence of row X, then:
let R = T;
do
let R = select * from T
union
select R.K1, T.K2 from R inner join T on R.K2 = T.K1;
while "R changes";
The operator takes 4 mandatory inputs. First, a table T representing directed links in a graph. Second, a join predicate to determine when a link and a path can be concatenated (e.g., R.K2=T.K1). Third, a project_list representing the columns to be preserved after such a concatenation, each column may be the result of a scalar computation (including aggregate functions). In the above program, it is represented by R.K1, T.K2, but it may also include Pi columns from R and T. Fourth, a predicate to select result tuples based on their derivation history (see below). A fifth optional input represents a selection condition on the initial table. The derivation path that led to the existence of a row in the transitive_closure of T is captured in an additional chaptered column, called Delta, that gets implicitly attached to each result row. Thus, the operator's output is a hierarchical table R, having the same columns as T plus the chaptered column. For example, if a relation T is defined as:
T | K1 | K2 |
---|---|---|
a | b | |
b | c | |
c | d |
The result R of the transitive closure of T would be:
R | K1 | K2 | Delta |
---|---|---|---|
A | b | {<a,b>} | |
B | c | {<b,c>} | |
C | d | {<c,d>} | |
A | c | {<a,b>, <b,c>} | |
B | d | {<b,c>, <c,d>} | |
A | d | {<a,b>, <b,c>, <c,d>} |
Thus, the fourth input to this operator is a predicate involving Delta.