Class RangeGenerator
java.lang.Object
com.darkcollective.relix.processor.generator.RangeGenerator
- All Implemented Interfaces:
Generator
Range(lo, hi[, step]) — a finite arithmetic series, the generate_series
workhorse. Emits one row per value lo, lo+step, … ≤ hi in a
single column n:NUMBER. step defaults to 1; lo > hi
yields no rows.
Arguments are integers given as strings: lo and hi are required,
step is an optional positive integer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncardinality(Map<String, String> args) The generator's exact cardinality for the given arguments, when known — fed to the cost model as an exact row count (a finite generator likeRangeknows it precisely).booleanWhether this generator is inherently duplicate-free (every row distinct).name()Lazily produces the generator's rows.The schema (heading) this generator produces for the given arguments.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.darkcollective.relix.processor.generator.Generator
ascendingColumn, unbounded
-
Constructor Details
-
RangeGenerator
public RangeGenerator()
-
-
Method Details
-
name
-
schema
Description copied from interface:GeneratorThe schema (heading) this generator produces for the given arguments. Implementations should keep this total where possible — argument validation that only affects the rows belongs inGenerator.rows(java.util.Map<java.lang.String, java.lang.String>, com.darkcollective.relix.symbol.Schema). -
rows
Description copied from interface:GeneratorLazily produces the generator's rows.- Specified by:
rowsin interfaceGenerator- Parameters:
args- the raw generator arguments (e.g.lo/hi/step)schema- the schema returned byGenerator.schema(Map)for the same args- Returns:
- a lazy stream of rows; the caller closes it
-
cardinality
Description copied from interface:GeneratorThe generator's exact cardinality for the given arguments, when known — fed to the cost model as an exact row count (a finite generator likeRangeknows it precisely). ReturnsOptionalLong.empty()when unknown or unbounded; the default is empty.- Specified by:
cardinalityin interfaceGenerator- Parameters:
args- the raw generator arguments- Returns:
- the exact row count, or empty when unknown/unbounded
-
duplicateFree
public boolean duplicateFree()Description copied from interface:GeneratorWhether this generator is inherently duplicate-free (every row distinct). Read byGeneratorDistinctnessSource, which feeds distinctness-drivenδelimination (DIST-001).- Specified by:
duplicateFreein interfaceGenerator- Returns:
trueif the generator never emits a duplicate row
-