Class InferencePlan<PlanType extends InferencePlan<PlanType>>

All Implemented Interfaces:
NamedWriteable, Writeable, Resolvable, GeneratingPlan<InferencePlan<PlanType>>, ExecutesOn, ExecutesOn.Coordinator, SortAgnostic, Streaming
Direct Known Subclasses:
Completion, Rerank

public abstract class InferencePlan<PlanType extends InferencePlan<PlanType>> extends UnaryPlan implements Streaming, SortAgnostic, GeneratingPlan<InferencePlan<PlanType>>, ExecutesOn.Coordinator
  • Field Details

    • INFERENCE_ID_OPTION_NAME

      public static final String INFERENCE_ID_OPTION_NAME
      See Also:
    • VALID_INFERENCE_OPTION_NAMES

      public static final List<String> VALID_INFERENCE_OPTION_NAMES
  • Constructor Details

  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • inferenceId

      public Expression inferenceId()
    • expressionsResolved

      public boolean expressionsResolved()
      Specified by:
      expressionsResolved in class LogicalPlan
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class UnaryPlan
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class UnaryPlan
    • taskType

      public abstract TaskType taskType()
    • withInferenceId

      public abstract PlanType withInferenceId(Expression newInferenceId)
    • withInferenceResolutionError

      public PlanType withInferenceResolutionError(String inferenceId, String error)
    • validOptionNames

      public List<String> validOptionNames()
    • isFoldable

      public abstract boolean isFoldable()
      Checks if this InferencePlan is foldable (all input expressions are foldable). A plan is foldable if all its input expressions can be evaluated statically.