- All Implemented Interfaces:
Serializable,Comparable<CostTier>,Constable
Ordinal cost tier for a relation or sub-expression, used by
CostEstimator to rank data sources from cheapest to most expensive.
The natural Enum.ordinal() ordering represents increasing I/O cost:
INLINE < FILE < REMOTE. Rules that compare two inputs use
ordinal comparison to decide which is cheaper.
There is deliberately no VIEW tier. A named query
view has no I/O of its own — its cost is entirely that of the leaves its body
reads — and CostEstimator says so directly: tierFor maps a
QueryRelationSymbol to a recursive estimate of body(), so no
code path could ever return a VIEW constant.
The label() method returns a short lower-case string suitable
for embedding in transformation detail messages.
-
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 TypeMethodDescriptionlabel()Returns a short lower-case label suitable for display in transformation detail messages (e.g.static CostTierReturns the enum constant of this class with the specified name.static CostTier[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INLINE
Inline relation literal — data is embedded directly in the script and held entirely in memory at parse time. Zero I/O cost. -
FILE
File-backed source — local file I/O (e.g. CSV). Moderate cost. -
REMOTE
Remote database source — JDBC network round-trip. Highest cost tier.
-
-
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
-
label
Returns a short lower-case label suitable for display in transformation detail messages (e.g."inline","remote").- Returns:
- the label string; never null
-