Record Class BooleanLogicExpressionEvaluator
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.expression.predicate.logical.BooleanLogicExpressionEvaluator
- All Implemented Interfaces:
Closeable,AutoCloseable,ExpressionEvaluator,org.elasticsearch.core.Releasable
public record BooleanLogicExpressionEvaluator(BinaryLogic bl, ExpressionEvaluator leftEval, ExpressionEvaluator rightEval)
extends Record
implements ExpressionEvaluator
Evaluator for the three-valued boolean expressions.
We can't generate these with the
Evaluator annotation because that
always implements viral null. And three-valued boolean expressions don't.
false AND null is false and true OR null is true.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBooleanLogicExpressionEvaluator(BinaryLogic bl, ExpressionEvaluator leftEval, ExpressionEvaluator rightEval) Creates an instance of aBooleanLogicExpressionEvaluatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongbl()Returns the value of theblrecord component.voidclose()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.leftEval()Returns the value of theleftEvalrecord component.Returns the value of therightEvalrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
BooleanLogicExpressionEvaluator
public BooleanLogicExpressionEvaluator(BinaryLogic bl, ExpressionEvaluator leftEval, ExpressionEvaluator rightEval) Creates an instance of aBooleanLogicExpressionEvaluatorrecord class.- Parameters:
bl- the value for theblrecord componentleftEval- the value for theleftEvalrecord componentrightEval- the value for therightEvalrecord component
-
-
Method Details
-
eval
- Specified by:
evalin interfaceExpressionEvaluator
-
baseRamBytesUsed
public long baseRamBytesUsed()- Specified by:
baseRamBytesUsedin interfaceExpressionEvaluator
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
bl
Returns the value of theblrecord component.- Returns:
- the value of the
blrecord component
-
leftEval
Returns the value of theleftEvalrecord component.- Returns:
- the value of the
leftEvalrecord component
-
rightEval
Returns the value of therightEvalrecord component.- Returns:
- the value of the
rightEvalrecord component
-