Class NumericAggregate
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.expression.function.aggregate.AggregateFunction
org.elasticsearch.xpack.esql.expression.function.aggregate.NumericAggregate
- All Implemented Interfaces:
NamedWriteable,Writeable,PostAnalysisPlanVerificationAware,Resolvable,ToAggregator
- Direct Known Subclasses:
MedianAbsoluteDeviation,Percentile,Sum
Aggregate function that receives a numeric, signed field, and returns a single double value.
Implement the supplier methods to return the correct AggregatorFunctionSupplier.
Some methods can be optionally overridden to support different variations:
-
supportsDates(): override to also support dates. Defaults to false. -
resolveType(): override to support different parameters. Callsuper.resolveType()to add extra checks. -
dataType(): override to return a different datatype. You can returnfield().dataType()to propagate the parameter type.
-
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> -
Method Summary
Modifier and TypeMethodDescriptiondataType()protected abstract AggregatorFunctionSupplierprotected abstract AggregatorFunctionSupplierprotected abstract AggregatorFunctionSupplierprotected Expression.TypeResolutionsupplier()protected booleanMethods inherited from class org.elasticsearch.xpack.esql.expression.function.aggregate.AggregateFunction
deprecatedWriteParams, equals, field, filter, hasFilter, hashCode, parameters, postAnalysisPlanVerification, withFilter, withParameters, writeToMethods inherited from class org.elasticsearch.xpack.esql.core.expression.function.Function
arguments, functionName, nodeString, nullableMethods inherited from class org.elasticsearch.xpack.esql.core.expression.Expression
canonical, canonicalize, childrenResolved, fold, foldable, 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, replaceChildren, 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
-
Method Details
-
resolveType
- Overrides:
resolveTypein classAggregateFunction
-
supportsDates
protected boolean supportsDates() -
dataType
- Specified by:
dataTypein classExpression
-
supplier
- Specified by:
supplierin interfaceToAggregator
-
longSupplier
-
intSupplier
-
doubleSupplier
-