Package com.darkcollective.relix.processor.exec
This package contains the recursive RelNodeExecutor
that walks a RelNode tree and produces a lazy
Stream<Row> pipeline.
All 21 node types of the sealed RelNode hierarchy
are implemented.
Streaming vs. materialising operators
Unary streaming operators (Selection, Projection,
Rename, Limit, Distinct, UnionAll) chain directly
onto the input stream without intermediate materialisation.
Operators that require full materialisation collect the input into an appropriate
MaterializedRelation collection type
before returning a fresh stream:
BagRelation— ordered, duplicates allowed (Sort, Aggregation, UnionAll output, outer-join unmatched rows)SetRelation— insertion-order, deduplicated (Union, Intersection, Difference)SortedBagRelation— sorted, duplicates allowed (Sort output)IndexedRelation— grouped by key (Aggregation intermediate)
Binary join algorithms
All joins use nested-loop. The right-hand side is always fully materialised;
the left-hand side is streamed where possible (Product, ThetaJoin,
LeftOuterJoin, SemiJoin, AntiJoin) and materialised where
the algorithm requires random access (NaturalJoin, RightOuterJoin,
FullOuterJoin).
Set operations
Union deduplicates via SetRelation.
Intersection and Difference materialise the right side as a set for
O(1) membership tests while streaming the left side. Division uses the
nested-loop "for-all" check with a hash-set lookup of full left-row tuples.
-
ClassDescriptionA materialised relation that preserves insertion order and allows duplicate rows — the
Bagtype in the IBM flat-collection taxonomy.A materialised relation whose rows are partitioned into groups by a composite key — theRelationtype in the IBM flat-collection taxonomy (Key, Element Equality, Unordered, Multiple).A relation that has been fully materialised into an in-memory collection.A read-only positional view over a left row concatenated with a right row, used to evaluate a join condition with correct handling of qualified attribute references.Executes a logical relational algebraRelNodetree.A materialised relation that contains only unique rows, preserving the order in which rows were first inserted — theSettype in the IBM flat-collection taxonomy (No Key, Element Equality, Unordered, Unique).A materialised relation whose rows are kept in a stable sorted order and may contain duplicates — theSorted bagtype in the IBM flat-collection taxonomy (No Key, No Element Equality required, Sorted, Multiple).