Class NamedSubquery
- All Implemented Interfaces:
NamedWriteable,Writeable,TelemetryAware,Resolvable,SortAgnostic
Subquery that carries the view name it was resolved from.
Unlike plain Subquery, the name participates in equals(java.lang.Object) and hashCode(),
which allows Node.transformDown to distinguish a newly-tagged subquery from its
untagged predecessor. After view resolution, a post-processing pass converts
UnionAll nodes containing NamedSubquery children into ViewUnionAll.
This class should only be used during query re-writing and not survive in the final query plan. If we decide to keep named subqueries as a feature later, we should add serialization support.
-
Nested Class Summary
Nested 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.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected NodeInfo<NamedSubquery> info()Normally, you want to use one of the staticcreatemethods to implement this.name()voidnodeString(StringBuilder sb, Node.NodeStringFormat format) Append thisNode's string representation tosb.replaceChild(LogicalPlan newChild) Methods inherited from class org.elasticsearch.xpack.esql.plan.logical.Subquery
expressionsResolved, getWriteableName, output, plan, writeToMethods 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, resolved, 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
allMatch, 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, 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.capabilities.TelemetryAware
telemetryLabel
-
Constructor Details
-
NamedSubquery
-
-
Method Details
-
name
-
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. -
replaceChild
- Overrides:
replaceChildin classSubquery
-
hashCode
public int hashCode() -
equals
-
nodeString
Description copied from class:Node- Overrides:
nodeStringin classSubquery- Parameters:
sb- target for the stringformat- configuration for rendering the string representation
-