Class AbstractMultivalueFunction.AbstractEvaluator
java.lang.Object
org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.AbstractMultivalueFunction.AbstractNullableEvaluator
org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.AbstractMultivalueFunction.AbstractEvaluator
- All Implemented Interfaces:
Closeable,AutoCloseable,EvalOperator.ExpressionEvaluator,org.elasticsearch.core.Releasable
- Enclosing class:
AbstractMultivalueFunction
public abstract static class AbstractMultivalueFunction.AbstractEvaluator
extends AbstractMultivalueFunction.AbstractNullableEvaluator
Base evaluator that can handle both nulls- and no-nulls-containing blocks.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.compute.operator.EvalOperator.ExpressionEvaluator
EvalOperator.ExpressionEvaluator.Factory -
Field Summary
Fields inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.AbstractMultivalueFunction.AbstractNullableEvaluator
driverContext, field -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractEvaluator(DriverContext driverContext, EvalOperator.ExpressionEvaluator field) -
Method Summary
Modifier and TypeMethodDescriptionfinal Blockprotected abstract BlockevalNotNullable(Block fieldVal) Called when evaluating aBlockthat does not contain null values.protected BlockevalSingleValuedNotNullable(Block fieldRef) Called to evaluate single valued fields when the target block does not have null values.Methods inherited from class org.elasticsearch.xpack.esql.expression.function.scalar.multivalue.AbstractMultivalueFunction.AbstractNullableEvaluator
close, evalNullable, evalSingleValuedNullable, name, toString
-
Constructor Details
-
AbstractEvaluator
-
-
Method Details
-
evalNotNullable
Called when evaluating aBlockthat does not contain null values. It’s useful to specialize this fromAbstractMultivalueFunction.AbstractNullableEvaluator.evalNullable(org.elasticsearch.compute.data.Block)because it knows that it’s producing an "array vector" because it only ever emits single valued fields and no null values. Building an array vector directly is generally faster than building it via aBlock.Builder.- Returns:
- the returned Block has its own reference and the caller is responsible for releasing it.
-
evalSingleValuedNotNullable
Called to evaluate single valued fields when the target block does not have null values.- Returns:
- the returned Block has its own reference and the caller is responsible for releasing it.
-
eval
- Specified by:
evalin interfaceEvalOperator.ExpressionEvaluator- Overrides:
evalin classAbstractMultivalueFunction.AbstractNullableEvaluator
-