Understanding node operators
Node operators process the output of other operators to produce rows.
Augment
Augment adds the result of an expression as a new column to each row in the target relation.
Box
Box appends a nested relation containing a single row whose columns are a subset of the columns in the input row. The boxed columns are removed from the input row. Both the inner and outer relations are projections of the input relation. In other words, columns can be rearranged.
CallExecutionUnit
CallExecutionUnit executes the equivalent of a subroutine call. CallExecutionUnit augments each incoming row with an iterator that iterates over the product of a dependent execution unit. The dependent execution unit can be parameterized with data from the input relation or from the calling execution unit. The parameters are either scalar types or iterators over nested relations.
DependentJoin
DependentJoin joins an input relation with the product of a dependent execution unit. The dependent execution unit can be parameterized with data from the input relation or from the calling execution unit. The join itself is unconditional. Because the dependent execution unit is parameterized, however, the contents of the dependent relation can be different for every input row. The join is either nesting or flat:
*Nesting
Each input row is augmented by a single iterator column that contains the dependent execution unit’s output rows.
*Flat
Each input row is augmented by all the columns of the dependent execution unit’s output rows.
Dup
Dup creates a second independent iterator over a materialized relation. In effect, Dup duplicates the relation. The duplicated relation can come from any row in the target path. It is possible to take a relation that is nested in an outer row and nest a copy of it into every row in a deeper relation. The output row is a copy of the input row with the additional iterator on the end.
Materialize
Materialize caches an entire relation, including its descendants in the executor’s memory. Iterators over the relation and its descendants can then be reset repeatedly. This is necessary if the relation is duplicated or if the relation is to be aggregated over as well as detailed. Materialize does not change any data. Materialize simply accumulates rows from its input and does not release the rows until they are no longer needed.
MergeJoin
MergeJoin performs an equijoin between left and right relations. Both relations must be ordered by join condition. The join can be nesting or flat:
*Nesting
Each left-side row is augmented by a single iterator column that contains the selected right-side rows.
*Flat
Each left-side row is augmented by all the columns of the selected right-side rows.
Move
Move copies an iterator. The copied iterator can come from any row in the target path. It is possible to take a relation that is nested in an outer row and nest a copy of it into every row in a deeper relation. Unlike Dup, the copied iterator shares state with the original one. It is illegal to iterate over one iterator in an inner loop while maintaining the context of the other in an outer loop.
MultiAugment
MultiAugment augments a row with an iterator column. This iterator produces a relation whose contents are the result of evaluating an expression. One row is produced for each expression, and then the inner iterator is exhausted until the outer iterator is advanced again. The operator has the effect of augmenting a row with a sequence.
Nest
Nest groups adjacent rows that match an equality constraint. The group of rows is then replaced by a single outer row with a nested relation containing the same number of rows that were in the group. The columns in the input rows that are projected into the inner relation are independent of the columns that are compared to determine grouping.
NestedLoopJoin
NestedLoopJoin joins two input relations by evaluating an expression for every pair of rows. NestedLoopJoin materializes the right-side relation and then, for every left-side row, iterates over all rows in the right-side materialization, evaluating the expression each time. If the result of the expression is True, the rows match.
Project
Project reorders or removes columns within a relation.
Select
Select removes rows from the target relation. For every input row, an expression is evaluated. If the result of the expression is False, the row is rejected. When Select is advanced, it advances its input iterator repeatedly until it finds a row that is accepted. Then it passes that row on.
Sort
Sort sorts a relation using one or more sort keys. The relation is first materialized.
Union
Union combines the rows from two relations without eliminating any duplicates. The left-side rows are output first, and then the right-side rows.