Class GeneratorBoundednessSource
java.lang.Object
com.darkcollective.relix.processor.generator.GeneratorBoundednessSource
- All Implemented Interfaces:
BoundednessSource
A
BoundednessSource backed by a model's sources and the generator registry: a leaf
relation is Boundedness.UNBOUNDED iff it is a generator
source whose generator declares Generator.unbounded(); every other leaf
(CSV/JSON/JDBC/inline/finite generator) is Boundedness.BOUNDED.
This is the producer the planner's materialisation-safety check and join
build-side rule consume: Naturals and Primes report
UNBOUNDED, Range and every non-generator leaf BOUNDED.
Which generators are infinite is the registry's answer
(GeneratorCatalog.generatorBoundedness), asked here rather than re-read off
Generator.unbounded(), so the planner and relix.relations.boundedness
cannot come to different conclusions about the same generator. What differs between
them is only what an unregistered name means, and that difference is
deliberate — see below.
-
Field Summary
Fields inherited from interface com.darkcollective.relix.cost.BoundednessSource
ALL_BOUNDED -
Constructor Summary
ConstructorsConstructorDescriptionGeneratorBoundednessSource(Map<String, SourceDeclaration> sources, GeneratorRegistry registry) -
Method Summary
Modifier and TypeMethodDescriptionboundednessOf(String relationName) Returns the boundedness of the leaf relation namedrelationName.
-
Constructor Details
-
GeneratorBoundednessSource
public GeneratorBoundednessSource(Map<String, SourceDeclaration> sources, GeneratorRegistry registry) - Parameters:
sources- canonical (lower-cased) relation name → source declaration (as inSemanticModel.sources()); must not be nullregistry- the generator registry; must not be null
-
-
Method Details
-
boundednessOf
Description copied from interface:BoundednessSourceReturns the boundedness of the leaf relation namedrelationName.- Specified by:
boundednessOfin interfaceBoundednessSource- Parameters:
relationName- the leaf relation name; never null- Returns:
- its boundedness; never null
-