Class NamedExpression
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<Expression>
org.elasticsearch.xpack.esql.core.expression.Expression
org.elasticsearch.xpack.esql.core.expression.NamedExpression
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable
- Direct Known Subclasses:
Alias,Attribute,UnresolvedNamedExpression
An expression that has a name. Named expressions can be used as a result
(by converting to an attribute).
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
Expression.TypeResolutionNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionNamedExpression(Source source, String name, List<Expression> children, NameId id) NamedExpression(Source source, String name, List<Expression> children, NameId id, boolean synthetic) -
Method Summary
Methods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, canonicalize, childrenResolved, dataType, fold, foldable, nullable, propertiesToString, references, resolved, resolveType, semanticEquals, semanticHash, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
anyMatch, children, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, info, nodeName, nodeProperties, replaceChildren, replaceChildrenSameSize, source, sourceLocation, sourceText, 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
-
NamedExpression
-
NamedExpression
public NamedExpression(Source source, String name, List<Expression> children, @Nullable NameId id, boolean synthetic)
-
-
Method Details
-
name
-
id
-
synthetic
public boolean synthetic()Synthetic named expressions are not user defined and usually created during optimizations and substitutions, e.g. when turning... | STATS x = avg(2*field)into... | EVAL $$synth$attribute = 2*field | STATS x = avg($$synth$attribute). -
toAttribute
Try to return eitherthisif it is anAttribute, or aReferenceAttributeto it otherwise. Return anUnresolvedAttributeif this is unresolved. -
hashCode
public int hashCode()- Overrides:
hashCodein classNode<Expression>
-
equals
- Overrides:
equalsin classNode<Expression>
-
toString
- Overrides:
toStringin classExpression
-
nodeString
- Overrides:
nodeStringin classNode<Expression>
-