Class LookupJoin
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.LookupJoin
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisVerificationAware,PostOptimizationVerificationAware,TelemetryAware,Resolvable,ExecutesOn,SortAgnostic,SurrogateLogicalPlan
public class LookupJoin
extends Join
implements SurrogateLogicalPlan, TelemetryAware, PostAnalysisVerificationAware
Lookup join - specialized LEFT (OUTER) JOIN between the main left side and a lookup index (index_mode = lookup) on the right.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.plan.logical.LogicalPlan
LogicalPlan.StageNested 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.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_TYPES -
Constructor Summary
ConstructorsConstructorDescriptionLookupJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> joinFields) LookupJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> joinFields, boolean isRemote) LookupJoin(Source source, LogicalPlan left, LogicalPlan right, JoinConfig joinConfig) LookupJoin(Source source, LogicalPlan left, LogicalPlan right, JoinConfig joinConfig, boolean isRemote) LookupJoin(Source source, LogicalPlan left, LogicalPlan right, JoinType type, List<Attribute> joinFields, List<Attribute> leftFields, List<Attribute> rightFields, boolean isRemote) -
Method Summary
Modifier and TypeMethodDescriptioninfo()voidpostAnalysisVerification(Failures failures) Allows the implementer to validate itself.replaceChildren(LogicalPlan left, LogicalPlan right) Translate the expression into a regular join with a Projection on top, to deal with serialization & co.Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.join.Join
computeOutput, computeOutput, config, equals, executesOn, expressionsResolved, getWriteableName, hashCode, isRemote, leftReferences, makeReference, output, postOptimizationVerification, resolved, rightOutputFields, rightReferences, withConfig, writeToMethods 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
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUp
-
Constructor Details
-
LookupJoin
public LookupJoin(Source source, LogicalPlan left, LogicalPlan right, List<Attribute> joinFields, boolean isRemote) -
LookupJoin
-
LookupJoin
public LookupJoin(Source source, LogicalPlan left, LogicalPlan right, JoinType type, List<Attribute> joinFields, List<Attribute> leftFields, List<Attribute> rightFields, boolean isRemote) -
LookupJoin
-
LookupJoin
public LookupJoin(Source source, LogicalPlan left, LogicalPlan right, JoinConfig joinConfig, boolean isRemote)
-
-
Method Details
-
surrogate
Translate the expression into a regular join with a Projection on top, to deal with serialization & co.- Specified by:
surrogatein interfaceSurrogateLogicalPlan
-
replaceChildren
- Overrides:
replaceChildrenin classJoin
-
info
-
telemetryLabel
- Specified by:
telemetryLabelin interfaceTelemetryAware- Returns:
- the label reported in the telemetry data. Only needs to be overwritten if the label doesn't match the class name.
-
postAnalysisVerification
Description copied from interface:PostAnalysisVerificationAwareAllows the implementer to validate itself. This usually involves checking its internal setup, which often means checking the parameters it received on construction: their data or syntactic type, class, their count, expressions' structure etc. The discovered failures are added to the givenFailuresobject.It is often more useful to perform the checks as extended as it makes sense, over stopping at the first failure. This will allow the author to progress faster to a correct query.
Example: the
Filterclass, which models the WHERE command, checks that the expression it filters on -condition- is of a Boolean or NULL type:@Override void postAnalysisVerification(Failures failures) { if (condition.dataType() != NULL && condition.dataType() != BOOLEAN) { failures.add(fail(condition, "Condition expression needs to be boolean, found [{}]", condition.dataType())); } }- Specified by:
postAnalysisVerificationin interfacePostAnalysisVerificationAware- Overrides:
postAnalysisVerificationin classJoin- Parameters:
failures- the object to add failures to.
-