Package org.apache.druid.math.expr
Class ApplyFunction.BaseFoldFunction
- java.lang.Object
-
- org.apache.druid.math.expr.ApplyFunction.BaseFoldFunction
-
- All Implemented Interfaces:
ApplyFunction,NamedFunction
- Direct Known Subclasses:
ApplyFunction.CartesianFoldFunction,ApplyFunction.FoldFunction
- Enclosing interface:
- ApplyFunction
public abstract static class ApplyFunction.BaseFoldFunction extends Object implements ApplyFunction
Base class for family ofApplyFunctionwhich aggregate a scalar or array value given one or more array inputExprarguments and an array or scalar "accumulator" argument with an initial value
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.math.expr.ApplyFunction
ApplyFunction.AllMatchFunction, ApplyFunction.AnyMatchFunction, ApplyFunction.BaseFoldFunction, ApplyFunction.BaseMapFunction, ApplyFunction.CartesianFoldFunction, ApplyFunction.CartesianFoldLambdaBinding, ApplyFunction.CartesianMapFunction, ApplyFunction.CartesianMapLambdaBinding, ApplyFunction.FilterFunction, ApplyFunction.FoldFunction, ApplyFunction.FoldLambdaBinding, ApplyFunction.IndexableFoldLambdaBinding, ApplyFunction.IndexableMapLambdaObjectBinding, ApplyFunction.LambdaInputBindingInspector, ApplyFunction.MapFunction, ApplyFunction.MapLambdaBinding, ApplyFunction.MatchFunction, ApplyFunction.SettableLambdaBinding
-
-
Constructor Summary
Constructors Constructor Description BaseFoldFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpressionTypegetOutputType(Expr.InputBindingInspector inspector, LambdaExpr expr, List<Expr> args)Compute the output type of this function for a given lambda and the argument expressions which will be applied as its inputs.booleanhasArrayOutput(LambdaExpr lambdaExpr)Returns true if apply function produces an array output.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.druid.math.expr.ApplyFunction
apply, asVectorProcessor, canVectorize, getArrayInputs, validateArguments
-
Methods inherited from interface org.apache.druid.math.expr.NamedFunction
name, processingFailed, validationFailed, validationFailed, validationHelperCheckAnyOfArgumentCount, validationHelperCheckArgIsLiteral, validationHelperCheckArgumentCount, validationHelperCheckArgumentCount, validationHelperCheckArgumentRange, validationHelperCheckLambaArgumentCount, validationHelperCheckMinArgumentCount, validationHelperCheckMinArgumentCount
-
-
-
-
Method Detail
-
hasArrayOutput
public boolean hasArrayOutput(LambdaExpr lambdaExpr)
Description copied from interface:ApplyFunctionReturns true if apply function produces an array output. AllApplyFunctionimplementations are expected to exclusively produce either scalar or array values.- Specified by:
hasArrayOutputin interfaceApplyFunction
-
getOutputType
@Nullable public ExpressionType getOutputType(Expr.InputBindingInspector inspector, LambdaExpr expr, List<Expr> args)
Description copied from interface:ApplyFunctionCompute the output type of this function for a given lambda and the argument expressions which will be applied as its inputs.- Specified by:
getOutputTypein interfaceApplyFunction- See Also:
Expr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector)
-
-