Class InlineJoin
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisVerificationAware,Resolvable,SortAgnostic
Furthermore, this type of join indicates the right side is performing a subquery identical to the left side - meaning its result is required before joining with the left side.
This helps the model since we want any transformation applied to the source to show up on both sides of the join - due the immutability of the tree (which uses value instead of reference semantics), even if the same node instance would be used, any transformation applied on one side (which would create a new source) would not be reflected on the other side (still use the old source instance). This dedicated instance handles that by replacing the source of the right with a StubRelation that simplifies copies the output of the source, making it easy to serialize/deserialize as well as traversing the plan.
-
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.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.esql.plan.logical.join.Join
UNSUPPORTED_TYPES -
Constructor Summary
ConstructorsConstructorDescriptionInlineJoin(Source source, LogicalPlan left, LogicalPlan right, JoinConfig config) InlineJoin(Source source, LogicalPlan left, LogicalPlan right, JoinType type, List<Attribute> matchFields, List<Attribute> leftFields, List<Attribute> rightFields) -
Method Summary
Modifier and TypeMethodDescriptioninfo()static LogicalPlaninlineData(InlineJoin target, LocalRelation data) TODO: perform better planning Keep the join in place or replace it with a projection in case no grouping is necessary.replaceChildren(LogicalPlan left, LogicalPlan right) static LogicalPlanreplaceStub(LogicalPlan source, LogicalPlan stubbed) Replaces the stubbed source with the actual source.static LogicalPlanstubSource(UnaryPlan sourcePlan, LogicalPlan target) Replaces the source of the target plan with a stub preserving the output of the source plan.Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.join.Join
computeOutput, config, equals, expressionsResolved, hashCode, leftReferences, makeReference, output, postAnalysisVerification, 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, setAnalyzed, setOptimized, setPreAnalyzedMethods inherited from class org.elasticsearch.xpack.esql.plan.QueryPlan
computeExpressions, computeReferences, expressions, forEachExpression, forEachExpression, forEachExpressionDown, forEachExpressionDown, forEachExpressionUp, 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, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, nodeName, nodeProperties, nodeString, propertiesToString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp
-
Field Details
-
ENTRY
-
-
Constructor Details
-
InlineJoin
-
InlineJoin
public InlineJoin(Source source, LogicalPlan left, LogicalPlan right, JoinType type, List<Attribute> matchFields, List<Attribute> leftFields, List<Attribute> rightFields)
-
-
Method Details
-
stubSource
Replaces the source of the target plan with a stub preserving the output of the source plan. -
replaceStub
Replaces the stubbed source with the actual source. -
inlineData
TODO: perform better planning Keep the join in place or replace it with a projection in case no grouping is necessary. -
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Overrides:
getWriteableNamein classJoin
-
info
-
replaceChildren
- Overrides:
replaceChildrenin classJoin
-