Class SemiJoin
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<LogicalPlan>
org.elasticsearch.xpack.esql.plan.QueryPlan<LogicalPlan>
org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
org.elasticsearch.xpack.esql.plan.logical.BinaryPlan
org.elasticsearch.xpack.esql.plan.logical.join.Join
org.elasticsearch.xpack.esql.plan.logical.join.AbstractSubqueryJoin
org.elasticsearch.xpack.esql.plan.logical.join.SemiJoin
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisVerificationAware,PostOptimizationVerificationAware,Resolvable,ExecutesOn,ExecutesOn.Coordinator,SortAgnostic,SortPreserving
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.join.AbstractSubqueryJoin
AbstractSubqueryJoin.LogicalPlanTupleNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.plan.logical.ExecutesOn
ExecutesOn.Coordinator, ExecutesOn.ExecuteLocation, ExecutesOn.RemoteNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.capabilities.PostOptimizationVerificationAware
PostOptimizationVerificationAware.CoordinatorOnlyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.plan.logical.join.Join
ENTRY, UNSUPPORTED_TYPESFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionSemiJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> leftFields, List<Attribute> rightFields) SemiJoin(Source source, LogicalPlan left, LogicalPlan right, JoinConfig config) -
Method Summary
Modifier and TypeMethodDescriptionprotected LogicalPlanbuildEmptyRightSidePlan(Source source) Build the terminal plan when the right side has zero rows.info()Normally, you want to use one of the staticcreatemethods to implement this.replaceChildren(LogicalPlan left, LogicalPlan right) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.join.AbstractSubqueryJoin
buildFilterPathPlan, buildHashJoinPathPlan, buildShortCircuitPlan, computeOutputExpressions, expressionsResolved, filterNullLeftKeysBeforeHashJoin, firstSubPlan, getWriteableName, inlineData, inListFromDedupKeys, isSubqueryJoinUnsupported, newMainPlan, postAnalysisVerification, sentinelFilterCondition, shortCircuitOnAnyRightNull, wrapInExpression, writeToMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.join.Join
computeOutputExpressions, config, equals, executesOn, getRightToSerialize, hashCode, isRemote, leftReferences, makeReference, output, postOptimizationVerification, resolved, rightOutputFields, rightReferences, withConfigMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.BinaryPlan
left, replaceChildren, replaceLeft, replaceRight, rightMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
analyzed, childrenResolved, optimized, preAnalyzed, preOptimized, setAnalyzed, setOptimized, setPreAnalyzed, setPreOptimizedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, computeReferences, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionUp, inputSet, outputSet, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, toString, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.plan.logical.ExecutesOn.Coordinator
executesOnMethods inherited from interface org.elasticsearch.xpack.esql.capabilities.PostAnalysisVerificationAware
postAnalysisVerification
-
Constructor Details
-
SemiJoin
-
SemiJoin
public SemiJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> leftFields, List<Attribute> rightFields)
-
-
Method Details
-
info
Description copied from class:NodeNormally, you want to use one of the staticcreatemethods 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 likeQueryPlan#transformExpressionsOnly(Function)will not have an effect. -
replaceChildren
- Overrides:
replaceChildrenin classJoin
-
buildEmptyRightSidePlan
Description copied from class:AbstractSubqueryJoinBuild 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:
buildEmptyRightSidePlanin classAbstractSubqueryJoin
-