Enum StateTtlHint
- All Implemented Interfaces:
Serializable,Comparable<StateTtlHint>
Hint strategy to configure different
ExecutionConfigOptions.IDLE_STATE_RETENTION for stream joins.
TODO support agg state ttl hint.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInstructs the optimizer to use the specified state ttl for the underlying table. -
Method Summary
Modifier and TypeMethodDescriptiongetStateTtlFromHintOnBiRel(List<org.apache.calcite.rel.hint.RelHint> hints) Get the state ttl from hints on theBiRelsuch as Join and Correlate.static LonggetStateTtlFromHintOnSingleRel(List<org.apache.calcite.rel.hint.RelHint> hints) Get the state ttl from hints on theSingleRelsuch as Aggregate.static booleanisStateTtlHint(String hintName) static StateTtlHintReturns the enum constant of this type with the specified name.static StateTtlHint[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
STATE_TTL
Instructs the optimizer to use the specified state ttl for the underlying table.Only accept key-value hint options.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getHintName
-
isStateTtlHint
-
getStateTtlFromHintOnBiRel
public static Map<Integer,Long> getStateTtlFromHintOnBiRel(List<org.apache.calcite.rel.hint.RelHint> hints) Get the state ttl from hints on theBiRelsuch as Join and Correlate.- Returns:
- The key of the map is the input side. The value of the map is the state ttl in milliseconds.
-
getStateTtlFromHintOnSingleRel
@Nullable public static Long getStateTtlFromHintOnSingleRel(List<org.apache.calcite.rel.hint.RelHint> hints) Get the state ttl from hints on theSingleRelsuch as Aggregate.- Returns:
- the state ttl in milliseconds. If no state ttl hints set from hint, return "null".
-