Class GeneratorBoundednessSource

java.lang.Object
com.darkcollective.relix.processor.generator.GeneratorBoundednessSource
All Implemented Interfaces:
BoundednessSource

public final class GeneratorBoundednessSource extends Object implements 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.

  • Constructor Details

    • GeneratorBoundednessSource

      public GeneratorBoundednessSource(Map<String,SourceDeclaration> sources, GeneratorRegistry registry)
      Parameters:
      sources - canonical (lower-cased) relation name → source declaration (as in SemanticModel.sources()); must not be null
      registry - the generator registry; must not be null
  • Method Details

    • boundednessOf

      public Boundedness boundednessOf(String relationName)
      Description copied from interface: BoundednessSource
      Returns the boundedness of the leaf relation named relationName.
      Specified by:
      boundednessOf in interface BoundednessSource
      Parameters:
      relationName - the leaf relation name; never null
      Returns:
      its boundedness; never null