Class DenseVectorArithmeticOperation
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<Object,Object,Object,BinaryArithmeticOperation>
org.elasticsearch.xpack.esql.core.expression.predicate.BinaryOperator<Object,Object,Object,BinaryArithmeticOperation>
org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.ArithmeticOperation
org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation
org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.DenseVectorArithmeticOperation
- All Implemented Interfaces:
NamedWriteable,Writeable,Resolvable,EvaluatorMapper
- Direct Known Subclasses:
DateTimeArithmeticOperation,Div,Mul
Adds support for dense_vector data types. Specifically provides the logic when either left or right type is a dense_vector.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSet of arithmetic (quad) functions for dense_vectors.Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation
EsqlArithmeticOperation.BinaryEvaluator, EsqlArithmeticOperation.DoubleConstantFactory, EsqlArithmeticOperation.IntConstantFactory, EsqlArithmeticOperation.LongConstantFactoryNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
Expression.TypeResolutionNested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.tree.Node
Node.NodeStringFormatNested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
EvaluatorMapper.ToEvaluatorNested 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_SIZEFields inherited from class org.elasticsearch.xpack.esql.core.tree.Node
TO_STRING_MAX_LINES, TO_STRING_MAX_WIDTH -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDenseVectorArithmeticOperation(Source source, Expression left, Expression right, org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation.OperationSymbol op, EsqlArithmeticOperation.BinaryEvaluator ints, EsqlArithmeticOperation.BinaryEvaluator longs, EsqlArithmeticOperation.BinaryEvaluator ulongs, EsqlArithmeticOperation.BinaryEvaluator doubles, DenseVectorArithmeticOperation.DenseVectorBinaryEvaluator denseVectors) protectedDenseVectorArithmeticOperation(Source source, Expression left, Expression right, org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation.OperationSymbol op, EsqlArithmeticOperation.BinaryEvaluator ints, EsqlArithmeticOperation.BinaryEvaluator longs, EsqlArithmeticOperation.BinaryEvaluator ulongs, EsqlArithmeticOperation.BinaryEvaluator doubles, DenseVectorArithmeticOperation.DenseVectorBinaryEvaluator denseVectors, EsqlArithmeticOperation.IntConstantFactory intsConst, EsqlArithmeticOperation.LongConstantFactory longsConst, EsqlArithmeticOperation.DoubleConstantFactory doublesConst, boolean excludeZeroRhs) -
Method Summary
Modifier and TypeMethodDescriptionprotected Expression.TypeResolutionCheck if the two input types are compatible for this operationprotected Expression.TypeResolutionresolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) toEvaluator(EvaluatorMapper.ToEvaluator toEvaluator) Dispatch: try the constant-RHS fast path first (if the operator opted in via the constructor's fast-path factories); fall through to the binary path.Methods inherited from class org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation
dataType, fold, formatIncompatibleTypesMessage, resolveTypeMethods inherited from class org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.ArithmeticOperation
swapLeftAndRightMethods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.BinaryOperator
canonicalize, collectCommutative, isCommutativeMethods inherited from class org.elasticsearch.xpack.esql.core.expression.predicate.BinaryPredicate
equals, 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, propertiesToString, references, resolved, semanticEquals, semanticHash, toString, toString, typeResolvedMethods inherited from class org.elasticsearch.xpack.esql.core.tree.Node
allMatch, anyMatch, children, collect, collect, collect, collectFirstChildren, collectLeaves, doCollectFirst, forEachDown, forEachDown, forEachDownMayReturnEarly, forEachProperty, forEachPropertyDown, forEachPropertyOnly, forEachPropertyUp, forEachUp, forEachUp, info, nodeName, nodeProperties, nodeString, replaceChildrenSameSize, source, sourceLocation, sourceText, toString, transformChildren, transformChildren, transformDown, transformDown, transformDown, transformDown, transformDownSkipBranch, transformNodeProps, transformPropertiesDown, transformPropertiesOnly, transformPropertiesUp, transformUp, transformUp, transformUpMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.esql.evaluator.mapper.EvaluatorMapper
foldMethods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable
getWriteableName
-
Constructor Details
-
DenseVectorArithmeticOperation
protected DenseVectorArithmeticOperation(Source source, Expression left, Expression right, org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation.OperationSymbol op, EsqlArithmeticOperation.BinaryEvaluator ints, EsqlArithmeticOperation.BinaryEvaluator longs, EsqlArithmeticOperation.BinaryEvaluator ulongs, EsqlArithmeticOperation.BinaryEvaluator doubles, DenseVectorArithmeticOperation.DenseVectorBinaryEvaluator denseVectors) -
DenseVectorArithmeticOperation
protected DenseVectorArithmeticOperation(Source source, Expression left, Expression right, org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.EsqlArithmeticOperation.OperationSymbol op, EsqlArithmeticOperation.BinaryEvaluator ints, EsqlArithmeticOperation.BinaryEvaluator longs, EsqlArithmeticOperation.BinaryEvaluator ulongs, EsqlArithmeticOperation.BinaryEvaluator doubles, DenseVectorArithmeticOperation.DenseVectorBinaryEvaluator denseVectors, EsqlArithmeticOperation.IntConstantFactory intsConst, EsqlArithmeticOperation.LongConstantFactory longsConst, EsqlArithmeticOperation.DoubleConstantFactory doublesConst, boolean excludeZeroRhs)
-
-
Method Details
-
resolveInputType
protected Expression.TypeResolution resolveInputType(Expression e, TypeResolutions.ParamOrdinal paramOrdinal) - Overrides:
resolveInputTypein classArithmeticOperation
-
checkCompatibility
Description copied from class:EsqlArithmeticOperationCheck if the two input types are compatible for this operation- Overrides:
checkCompatibilityin classEsqlArithmeticOperation- Returns:
- TypeResolution.TYPE_RESOLVED iff the types are compatible. Otherwise, an appropriate type resolution error.
-
toEvaluator
Description copied from class:EsqlArithmeticOperationDispatch: try the constant-RHS fast path first (if the operator opted in via the constructor's fast-path factories); fall through to the binary path. Subclasses can still override this for orthogonal concerns (dense-vector, date-time) and callsuper.toEvaluator(...)for the numeric cases.- Specified by:
toEvaluatorin interfaceEvaluatorMapper- Overrides:
toEvaluatorin classEsqlArithmeticOperation
-