public abstract static class ApplyFunction.MatchFunction extends Object implements ApplyFunction
ApplyFunction which evaluate elements elements of a single array input against
a LambdaExpr to evaluate to a final 'truthy' valueApplyFunction.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 and Description |
|---|
MatchFunction() |
| Modifier and Type | Method and Description |
|---|---|
ExprEval |
apply(org.apache.druid.math.expr.LambdaExpr lambdaExpr,
List<Expr> argsExpr,
Expr.ObjectBinding bindings)
|
Set<Expr> |
getArrayInputs(List<Expr> args)
Get list of input arguments which must evaluate to an array
ExprType |
ExpressionType |
getOutputType(Expr.InputBindingInspector inspector,
org.apache.druid.math.expr.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.
|
abstract ExprEval |
match(Object[] values,
org.apache.druid.math.expr.LambdaExpr expr,
ApplyFunction.SettableLambdaBinding bindings) |
void |
validateArguments(org.apache.druid.math.expr.LambdaExpr lambdaExpr,
List<Expr> args)
Validate function arguments.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasVectorProcessor, canVectorize, hasArrayOutputname, processingFailed, validationFailed, validationFailed, validationHelperCheckAnyOfArgumentCount, validationHelperCheckArgIsLiteral, validationHelperCheckArgumentCount, validationHelperCheckArgumentCount, validationHelperCheckArgumentRange, validationHelperCheckLambaArgumentCount, validationHelperCheckMinArgumentCount, validationHelperCheckMinArgumentCountpublic ExprEval apply(org.apache.druid.math.expr.LambdaExpr lambdaExpr, List<Expr> argsExpr, Expr.ObjectBinding bindings)
ApplyFunctionLambdaExpr to argument list of Expr given a set of outer Expr.ObjectBinding. These
outer bindings will be used to form the scope for the bindings used to evaluate the LambdaExpr, which use
the array inputs to supply scalar values to use as bindings for IdentifierExpr in the lambda body.apply in interface ApplyFunctionpublic Set<Expr> getArrayInputs(List<Expr> args)
ApplyFunctionExprTypegetArrayInputs in interface ApplyFunctionpublic void validateArguments(org.apache.druid.math.expr.LambdaExpr lambdaExpr,
List<Expr> args)
ApplyFunctionApplyFunctionExpr is created, and should
validate everything that is feasible up front. Note that input type information is typically unavailable at the
time Expr are parsed, and so this method is incapable of performing complete validation.validateArguments in interface ApplyFunction@Nullable public ExpressionType getOutputType(Expr.InputBindingInspector inspector, org.apache.druid.math.expr.LambdaExpr expr, List<Expr> args)
ApplyFunctiongetOutputType in interface ApplyFunctionExpr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector)public abstract ExprEval match(Object[] values, org.apache.druid.math.expr.LambdaExpr expr, ApplyFunction.SettableLambdaBinding bindings)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.