Class QueryPlan<PlanType extends QueryPlan<PlanType>>
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<PlanType>
org.elasticsearch.xpack.esql.plan.QueryPlan<PlanType>
- All Implemented Interfaces:
NamedWriteable,Writeable
- Direct Known Subclasses:
LogicalPlan,PhysicalPlan
There are two main types of plans,
LogicalPlan and PhysicalPlan-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<Expression> protected AttributeSetThis very likely needs to be overridden forreferences()to be correct when inheriting.Returns the top-level expressions for this query plan node.<E extends Expression>
voidforEachExpression(Class<E> typeToken, Consumer<? super E> rule) voidforEachExpression(Consumer<? super Expression> rule) <E extends Expression>
voidforEachExpressionDown(Class<? extends E> typeToken, Consumer<? super E> rule) voidforEachExpressionDown(Consumer<? super Expression> rule) <E extends Expression>
voidforEachExpressionUp(Class<E> typeToken, Consumer<? super E> rule) voidforEachExpressionUp(Consumer<? super Expression> rule) inputSet()output()The ordered list of attributes (i.e.The attributes required to be in theinputSet()for this plan to be valid.<E extends Expression>
PlanTypetransformExpressionsDown(Class<E> typeToken, Function<E, ? extends Expression> rule) transformExpressionsDown(Function<Expression, ? extends Expression> rule) <E extends Expression>
PlanTypetransformExpressionsOnly(Class<E> typeToken, Function<E, ? extends Expression> rule) transformExpressionsOnly(Function<Expression, ? extends Expression> rule) <E extends Expression>
PlanTypetransformExpressionsOnlyUp(Class<E> typeToken, Function<E, ? extends Expression> rule) <E extends Expression>
PlanTypetransformExpressionsUp(Class<E> typeToken, Function<E, ? extends Expression> rule) transformExpressionsUp(Function<Expression, ? extends Expression> rule) Methods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, equals, forEachDown, forEachDown, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, hashCode, info, nodeName, nodeProperties, nodeString, propertiesToString, replaceChildren, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformDown, transformDown, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Constructor Details
-
QueryPlan
-
-
Method Details
-
output
The ordered list of attributes (i.e. columns) this plan produces when executed. Must be called only on resolved plans, otherwise may throw an exception or return wrong results. -
outputSet
-
inputSet
-
expressions
Returns the top-level expressions for this query plan node. In other words the node properties. -
computeExpressions
-
references
The attributes required to be in theinputSet()for this plan to be valid. Excludes generated references.E.g. for
EVAL x = 2*some_field, y = 2*xthis includessome_fieldbut neitherxnory. ForENRICH some_policy ON field WITH some_enrich_fieldthis includesfieldbut excludes the generated referencesome_enrich_field. -
computeReferences
This very likely needs to be overridden forreferences()to be correct when inheriting. This can be called on unresolved plans and therefore must not rely on calls tooutput(). -
transformExpressionsOnly
-
transformExpressionsOnly
public <E extends Expression> PlanType transformExpressionsOnly(Class<E> typeToken, Function<E, ? extends Expression> rule) -
transformExpressionsOnlyUp
public <E extends Expression> PlanType transformExpressionsOnlyUp(Class<E> typeToken, Function<E, ? extends Expression> rule) -
transformExpressionsDown
-
transformExpressionsDown
public <E extends Expression> PlanType transformExpressionsDown(Class<E> typeToken, Function<E, ? extends Expression> rule) -
transformExpressionsUp
-
transformExpressionsUp
public <E extends Expression> PlanType transformExpressionsUp(Class<E> typeToken, Function<E, ? extends Expression> rule) -
forEachExpression
-
forEachExpression
-
forEachExpressionDown
-
forEachExpressionDown
public <E extends Expression> void forEachExpressionDown(Class<? extends E> typeToken, Consumer<? super E> rule) -
forEachExpressionUp
-
forEachExpressionUp
public <E extends Expression> void forEachExpressionUp(Class<E> typeToken, Consumer<? super E> rule)
-