- All Implemented Interfaces:
Serializable,Comparable<Boundedness>,Constable
Whether a relation is guaranteed finite — a logical property propagated
bottom-up over a
RelNode tree.
The three values form a lattice ordered by "how unbounded":
BOUNDED < UNKNOWN < UNBOUNDED
BOUNDED— provably finite (files, database tables, inline and catalog relations, finite generators).UNKNOWN— finiteness cannot be proven either way. The safety check does not rejectUNKNOWN— only what is provablyUNBOUNDED.UNBOUNDED— provably infinite (an unbounded generator such asNaturalsorPrimes, or a streaming source). No operator or default ever producesUNBOUNDED; it originates only at a leaf and propagates upward (the "contagious-only" invariant), so a tree whose leaves are all bounded is itself provably bounded.
This boundedness property is distinct from cardinality: an honestly
unknown row count (a JDBC table without statistics) is still
BOUNDED, not UNKNOWN.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionlub(Boundedness other) The least upper bound of this andother— the boundedness of an operator combining inputs of these boundednesses.static BoundednessReturns the enum constant of this class with the specified name.static Boundedness[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOUNDED
Provably finite. -
UNKNOWN
Finiteness cannot be proven; conservatively allowed (not rejected). -
UNBOUNDED
Provably infinite.
-
-
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
-
lub
The least upper bound of this andother— the boundedness of an operator combining inputs of these boundednesses. Because the lattice is a total order, this is the more-unbounded of the two (so any unbounded input makes the combination unbounded; the contagious-only invariant).- Parameters:
other- the other boundedness; must not be null- Returns:
- the more-unbounded of the two
-