Class Expressions
java.lang.Object
org.elasticsearch.xpack.esql.core.expression.Expressions
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.elasticsearch.core.Tuple<Attribute, Expression>> aliases(List<? extends NamedExpression> named) static booleananyMatch(List<? extends Expression> exps, Predicate<? super Expression> predicate) asAttributes(List<? extends NamedExpression> named) static Attributestatic List<Expression> canonicalize(List<? extends Expression> exps) static booleanequalsAsAttribute(Expression left, Expression right) fold(FoldContext ctx, List<? extends Expression> exps) static booleanfoldable(List<? extends Expression> exps) static Stringid(Expression e) static booleanIs this Expression guaranteed to have only thenullvalue.static booleanstatic booleanlistSemanticEqualsIgnoreOrder(List<Expression> left, List<Expression> right) static booleanmatch(List<? extends Expression> exps, Predicate<? super Expression> predicate) static Stringname(Expression e) names(Collection<? extends Expression> e) static Nullabilitynullable(List<? extends Expression> exps) Return the logical AND of a list ofNullabilitystatic AttributeSetreferences(List<? extends Expression> exps) toReferenceAttributesPreservingIds(List<? extends NamedExpression> named, List<Attribute> existingOutput) Converts named expressions toReferenceAttributes, preservingNameIds for attributes whose name matches one inexistingOutput.
-
Method Details
-
asAttributes
-
toReferenceAttributesPreservingIds
public static List<Attribute> toReferenceAttributesPreservingIds(List<? extends NamedExpression> named, List<Attribute> existingOutput) Converts named expressions toReferenceAttributes, preservingNameIds for attributes whose name matches one inexistingOutput. Genuinely new attributes get fresh NameIds.Exception: a
FieldAttributebacked by anInvalidMappedField(ambiguous type across indices) is instead converted to anUnsupportedAttributeviaFieldAttribute.checkUnresolved(), so the analyzer can surface a clear user-facing error. -
anyMatch
public static boolean anyMatch(List<? extends Expression> exps, Predicate<? super Expression> predicate) -
match
public static boolean match(List<? extends Expression> exps, Predicate<? super Expression> predicate) -
nullable
Return the logical AND of a list ofNullabilityUNKNOWN AND TRUE/FALSE/UNKNOWN = UNKNOWN FALSE AND FALSE = FALSE TRUE AND FALSE/TRUE = TRUE
-
canonicalize
-
foldable
-
fold
-
references
-
name
-
isGuaranteedNull
Is this Expression guaranteed to have only thenullvalue. Expressions thatExpression.fold(org.elasticsearch.xpack.esql.core.expression.FoldContext)tonullmay returnfalsehere, but should eventually be folded into aLiteralcontainingnullwhich will returntruefrom here. -
names
-
attribute
-
isPresent
-
equalsAsAttribute
-
listSemanticEqualsIgnoreOrder
-
aliases
public static List<org.elasticsearch.core.Tuple<Attribute,Expression>> aliases(List<? extends NamedExpression> named) -
id
-