Enum StateTtlHint

java.lang.Object
java.lang.Enum<StateTtlHint>
org.apache.flink.table.planner.hint.StateTtlHint
All Implemented Interfaces:
Serializable, Comparable<StateTtlHint>

public enum StateTtlHint extends Enum<StateTtlHint>
Hint strategy to configure different ExecutionConfigOptions.IDLE_STATE_RETENTION for stream joins.

TODO support agg state ttl hint.

  • Enum Constant Details

    • STATE_TTL

      public static final StateTtlHint STATE_TTL
      Instructs the optimizer to use the specified state ttl for the underlying table.

      Only accept key-value hint options.

  • Method Details

    • values

      public static StateTtlHint[] 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

      public static StateTtlHint valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getHintName

      public String getHintName()
    • isStateTtlHint

      public static boolean isStateTtlHint(String hintName)
    • getStateTtlFromHintOnBiRel

      public static Map<Integer,Long> getStateTtlFromHintOnBiRel(List<org.apache.calcite.rel.hint.RelHint> hints)
      Get the state ttl from hints on the BiRel such 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 the SingleRel such as Aggregate.
      Returns:
      the state ttl in milliseconds. If no state ttl hints set from hint, return "null".