Class ResolvingProject
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.UnaryPlan
org.elasticsearch.xpack.esql.plan.logical.Project
org.elasticsearch.xpack.esql.plan.logical.local.EsqlProject
org.elasticsearch.xpack.esql.plan.logical.local.ResolvingProject
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,SortAgnostic,SortPreserving,Streaming
This version of
Project saves part of its state for computing its projections based on its child's output. This avoids
the problem that once the projections are computed, we don't know which pattern was used to generate them. This is important
when dealing with unmapped fields: E.g. in
SET unmapped_fields="nullify"; FROM idx | KEEP foo* | WHERE foo_bar > 10, if foo_bar is not mapped, we need to inject
a NULL literal for it before the KEEP. It's correct to update the projection of the KEEP to include this new
attribute because the pattern foo* matches it. But if the pattern was foo_baz, it would be incorrect to do so.-
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
Fields inherited from class org.elasticsearch.xpack.esql.plan.logical.local.EsqlProject
ENTRYFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionResolvingProject(Source source, LogicalPlan child, Function<List<Attribute>, List<? extends NamedExpression>> resolver) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()info()Normally, you want to use one of the staticcreatemethods to implement this.replaceChild(LogicalPlan newChild) Function<List<Attribute>, List<? extends NamedExpression>> resolver()withProjections(List<? extends NamedExpression> projections) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.local.EsqlProject
expressionsResolved, writeToMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.Project
output, projections, resolvedMethods inherited from class org.elasticsearch.xpack.esql.plan.logical.UnaryPlan
child, inputSet, outputSet, replaceChildrenMethods 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, references, transformExpressionsDown, transformExpressionsDown, transformExpressionsOnly, transformExpressionsOnly, transformExpressionsOnlyUp, transformExpressionsUp, transformExpressionsUpMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collect, 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
-
ResolvingProject
public ResolvingProject(Source source, LogicalPlan child, Function<List<Attribute>, List<? extends NamedExpression>> resolver)
-
-
Method Details
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable- Overrides:
getWriteableNamein classEsqlProject
-
resolver
-
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.- Overrides:
infoin classEsqlProject
-
replaceChild
- Overrides:
replaceChildin classEsqlProject
-
withProjections
- Overrides:
withProjectionsin classEsqlProject
-
hashCode
public int hashCode() -
equals
-
asEsqlProject
-