Class BinaryLogic
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<Boolean,Boolean,Boolean,BinaryLogicOperation>
org.elasticsearch.xpack.esql.core.expression.predicate.BinaryOperator<Boolean,Boolean,Boolean,BinaryLogicOperation>
org.elasticsearch.xpack.esql.expression.predicate.logical.BinaryLogic
- All Implemented Interfaces:
NamedWriteable,Writeable,TranslationAware,Resolvable
public abstract class BinaryLogic
extends BinaryOperator<Boolean,Boolean,Boolean,BinaryLogicOperation>
implements TranslationAware
-
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.xpack.esql.capabilities.TranslationAware
TranslationAware.SingleValueTranslationAwareNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedBinaryLogic(Source source, Expression left, Expression right, BinaryLogicOperation operation) -
Method Summary
Modifier and TypeMethodDescriptionasQuery(TranslatorHandler handler) Translates the implementing expression into a Query.static QuerydataType()protected booleannullable()protected Expression.TypeResolutionresolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) booleantranslatable(LucenePushdownPredicates pushdownPredicates) Indicates whether the expression can be translated or not.final voidwriteTo(StreamOutput out) Methods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.BinaryOperator
canonicalize, collectCommutative, resolveType, swapLeftAndRightMethods 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, rightMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, functionNameMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, childrenResolved, 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
-
BinaryLogic
protected BinaryLogic(Source source, Expression left, Expression right, BinaryLogicOperation operation) -
BinaryLogic
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBinaryScalarFunction- Throws:
IOException
-
dataType
- Specified by:
dataTypein classExpression
-
resolveInputType
protected Expression.TypeResolution resolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) - Specified by:
resolveInputTypein classBinaryOperator<Boolean,Boolean, Boolean, BinaryLogicOperation>
-
nullable
-
isCommutative
protected boolean isCommutative()- Overrides:
isCommutativein classBinaryOperator<Boolean,Boolean, Boolean, BinaryLogicOperation>
-
translatable
Description copied from interface:TranslationAwareIndicates whether the expression can be translated or not. Usually checks whether the expression arguments are actual fields that exist in Lucene.- Specified by:
translatablein interfaceTranslationAware
-
asQuery
Description copied from interface:TranslationAwareTranslates the implementing expression into a Query. If during translation a child needs to be translated first, the handler needs to be used even if the child implements this interface as well. This is to ensure that the child is wrapped in a SingleValueQuery if necessary.So use this:
Query childQuery = handler.asQuery(child);and not this:
Query childQuery = child.asQuery(handler);- Specified by:
asQueryin interfaceTranslationAware
-
boolQuery
-