Class HintStrategyTable

java.lang.Object
org.apache.calcite.rel.hint.HintStrategyTable

public class HintStrategyTable extends Object
A collection of HintStrategys.

Every hint must register a HintStrategy into the collection. With a hint strategies mapping, the hint strategy table is used as a tool to decide i) if the given hint was registered; ii) which hints are suitable for the rel with a given hints collection; iii) if the hint options are valid.

The hint strategy table is immutable. To create one, use builder().

Match of hint name is case insensitive.

See Also:
  • Field Details

  • Method Details

    • apply

      public List<RelHint> apply(List<RelHint> hints, RelNode rel)
      Applies this HintStrategyTable hint strategies to the given relational expression and the hints.
      Parameters:
      hints - Hints that may attach to the rel
      rel - Relational expression
      Returns:
      A hint list that can be attached to the rel
    • validateHint

      public boolean validateHint(RelHint hint)
      Checks if the given hint is valid.
      Parameters:
      hint - The hint
    • isRuleExcluded

      public boolean isRuleExcluded(Hintable hintable, RelOptRule rule)
      Returns whether the hintable has hints that imply the given rule should be excluded.
    • builder

      public static HintStrategyTable.Builder builder()
      Returns a HintStrategyTable builder.