
Rule Documentation

Rule Bound Variable in Union
Short Description:
This rule corrects the operator graph after its generation from the abstract syntax tree, especially for the case that variables are used in filter expressions, which are bound outside of the UNIONclause.See also:
Bound Variable in Optional
Long Description:
This rule avoids failures in SPARQL queries like { ?X ?Y ?Z. { ?X2 ?Y2 ?Z2. Filter(?X=?X2).} UNION { ... } }
Let P1 = ?X ?Y ?Z. and P2 = ?X2 ?Y2 ?Z2. If we do not correct the operator graph after generating the operator graph from the abstract syntax tree, then the Filterexpression is evaluated on results of P2, which is every time false (as ?X is not bound). Thus, we have to correct the operator graph and first join P1 and P2 before the evaluation of the filter expression.We display the graphical representation of the general transformation rule in the below given figure: