Class BinaryOperator<T,U,R,F extends PredicateBiFunction<T,U,R>>
java.lang.Object
org.elasticsearch.xpack.esql.core.tree.Node<Expression>
org.elasticsearch.xpack.esql.core.expression.Expression
org.elasticsearch.xpack.esql.core.expression.function.Function
org.elasticsearch.xpack.esql.core.expression.function.scalar.ScalarFunction
org.elasticsearch.xpack.esql.core.expression.function.scalar.BinaryScalarFunction
org.elasticsearch.xpack.esql.core.expression.predicate.BinaryPredicate<T,U,R,F>
org.elasticsearch.xpack.esql.core.expression.predicate.BinaryOperator<T,U,R,F>
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable
- Direct Known Subclasses:
BinaryComparison
public abstract class BinaryOperator<T,U,R,F extends PredicateBiFunction<T,U,R>>
extends BinaryPredicate<T,U,R,F>
Operator is a specialized binary predicate where both sides have the compatible types
(it's up to the analyzer to do any conversion if needed).
-
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> -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.ScalarFunction
MAX_BYTES_REF_RESULT_SIZE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBinaryOperator(Source source, Expression left, Expression right, F function) -
Method Summary
Modifier and TypeMethodDescriptionprotected Expressionprotected voidcollectCommutative(List<Expression> commutative, Expression expression) protected booleanprotected abstract Expression.TypeResolutionresolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) protected Expression.TypeResolutionThe implementation ofExpression.typeResolved(), which is just a caching wrapper around this method.abstract BinaryOperator<T, U, R, F> Methods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.BinaryPredicate
equals, fold, function, hashCode, nodeString, symbolMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.scalar.BinaryScalarFunction
foldable, left, replaceChildren, replaceChildren, right, writeToMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, functionName, nullableMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, childrenResolved, dataType, propertiesToString, references, resolved, semanticEquals, semanticHash, toString, 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, 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
-
BinaryOperator
-
-
Method Details
-
resolveInputType
protected abstract Expression.TypeResolution resolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) -
swapLeftAndRight
-
resolveType
Description copied from class:ExpressionThe implementation ofExpression.typeResolved(), which is just a caching wrapper around this method. See it's javadoc for what this method should return.Implementations will rarely interact with the
Expression.TypeResolutionclass directly, instead usually calling the utility methods onTypeResolutions.Implementations should fail if
Expression.childrenResolved()returnsfalse.- Overrides:
resolveTypein classExpression
-
isCommutative
protected boolean isCommutative() -
canonicalize
- Overrides:
canonicalizein classExpression
-
collectCommutative
-