A compiler phase which partitions a query for execution by multiple composed interpreters.
This phase transforms the input query by assigning subtrees to component
interpreters as specified by the supplied mapping
.
The mapping has Type
and field name pairs as keys and component id and
join function pairs as values. When the traversal of the input query
visits a Select
node with type Type.field name
it will replace the
Select
with a Component
node comprising,
- the component id of the interpreter which will be responsible for evaluating the subquery.
- A join function which will be called during interpretation with,
i) the cursor at that point in evaluation. ii) The deferred subquery.
This join function is responsible for computing the continuation query which will be evaluated by the responsible interpreter.
Because the join is provided with the cursor of the parent interpreter the subquery can be parameterised with values derived from the parent query.
Attributes
- Companion:
- object
- Source:
- compiler.scala
- Graph
- Supertypes