Class ViewInliner
java.lang.Object
com.darkcollective.relix.optimizer.internal.ViewInliner
Expands references to named views into the views' bodies, so that the rule
passes can optimise across former view boundaries (e.g. push a
selection from the outer query down into what used to be a view).
A reference RelationNode("V") that resolves to a
QueryRelationSymbol is replaced by
ρ V (inline(V.body)) — the view's (recursively inlined) body wrapped in
a relation-only RenameNode. The wrapper re-establishes V as a
relation alias so that qualified attribute references like V.col still
resolve to the correct side of a join after inlining (without it, the view name
would no longer name any subtree). A relation-only rename leaves column names
unchanged, so the expansion is otherwise transparent.
Base relations (inline literals, sources, databases) are left as
RelationNode leaves. Cycles are impossible because semantic analysis
rejects cyclic view definitions.
-
Method Summary