All Implemented Interfaces:
NamedWriteable, Writeable, PostAnalysisVerificationAware, PostOptimizationVerificationAware, Resolvable, ExecutesOn, ExecutesOn.Coordinator, SortAgnostic, SortPreserving

public class SemiJoin extends AbstractSubqueryJoin
A semi join implements WHERE field IN (subquery).

It uses the default AbstractSubqueryJoin hooks unchanged: the inlineData pipeline produces Filter(In(...)) (filter path) or a sentinel LEFT-join + Project (hash-join path), keeping the left rows that match at least one subquery value. The dual NOT IN form lives in AntiJoin; the OR-embedded form that preserves every row lives in MarkJoin.

  • Constructor Details

  • Method Details

    • info

      protected NodeInfo<Join> info()
      Description copied from class: Node
      Normally, you want to use one of the static create methods to implement this.

      For QueryPlans, it is very important that the properties contain all of the expressions and references relevant to this node, and that all the properties are used in the provided constructor; otherwise query plan transformations like QueryPlan#transformExpressionsOnly(Function) will not have an effect.

      Overrides:
      info in class Join
    • replaceChildren

      public Join replaceChildren(LogicalPlan left, LogicalPlan right)
      Overrides:
      replaceChildren in class Join
    • buildEmptyRightSidePlan

      protected LogicalPlan buildEmptyRightSidePlan(Source source)
      Description copied from class: AbstractSubqueryJoin
      Build the terminal plan when the right side has zero rows. x IN () ≡ FALSE for SEMI / MARK; x NOT IN () ≡ TRUE for ANTI. MarkJoin produces an Eval that sets the mark attribute to FALSE.
      Specified by:
      buildEmptyRightSidePlan in class AbstractSubqueryJoin