Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Enum Class MaterializationMode
- All Implemented Interfaces:
Serializable,Comparable<MaterializationMode>,Constable
Describes the output materialisation strategy of a relational algebra node.
Most operators produce a lazy Stream<Row> pipeline with no
intermediate collection (STREAM). A subset must accumulate all
output rows before the first result can be emitted; these are annotated
with one of the three materialising modes.
STREAM— lazy pipeline; no intermediate collection required. This is the default for selection, projection, rename, limit, distinct, and all join variants.BAG— all rows are collected into an ordered bag before output. Used by: aggregation (γ), union-all (⊎), division (÷), and full outer join (⟗).SET— all rows are collected and deduplicated before output. Used by: union (∪), intersection (∩), and difference (−).SORTED— all rows are collected then sorted before output. Used by: sort (τ).
The mode is surfaced in the IR report as a bracketed tag appended to the
node label — [bag], [set], or [sort] — so that
potentially expensive materialisation steps are immediately visible when
inspecting an expression tree. STREAM nodes carry no tag.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMaterialised bag — all output rows are collected into an ordered list before the first row is returned.Materialised set — all output rows are collected and deduplicated before the first row is returned.Materialised sorted bag — all output rows are collected and then sorted before the first row is returned.Lazy pipeline — no intermediate collection. -
Method Summary
Modifier and TypeMethodDescriptionstatic MaterializationModeReturns the enum constant of this class with the specified name.static MaterializationMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STREAM
Lazy pipeline — no intermediate collection. The node's output is a JavaStreamthat pulls rows on demand. -
BAG
Materialised bag — all output rows are collected into an ordered list before the first row is returned. Allows duplicates. -
SET
Materialised set — all output rows are collected and deduplicated before the first row is returned. -
SORTED
Materialised sorted bag — all output rows are collected and then sorted before the first row is returned.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-