Class ExpressionLambdaAggregatorInputBindings
- java.lang.Object
-
- org.apache.druid.query.aggregation.ExpressionLambdaAggregatorInputBindings
-
- All Implemented Interfaces:
Expr.InputBindingInspector
,Expr.ObjectBinding
public class ExpressionLambdaAggregatorInputBindings extends Object implements Expr.ObjectBinding
SpecialExpr.ObjectBinding
for use withExpressionLambdaAggregatorFactory
. This value binding holds a value for a special 'accumulator' variable, in addition to the 'normal' bindings to the underlying selector inputs for other identifiers, which allows for easy forward feeding of the results of an expression evaluation to use in the bindings of the next evaluation.
-
-
Constructor Summary
Constructors Constructor Description ExpressionLambdaAggregatorInputBindings(Expr.ObjectBinding inputBindings, String accumulatorIdentifier, ExprEval<?> initialValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accumulate(ExprEval<?> eval)
Object
get(String name)
Get value binding for string identifier ofIdentifierExpr
ExprEval<?>
getAccumulator()
ExpressionType
getType(String name)
Get theExpressionType
from the backing store for a given identifier (this is likely a column, but could be other things depending on the backing adapter)void
setAccumulator(ExprEval<?> acc)
-
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.Expr.InputBindingInspector
areNumeric, areNumeric, areSameTypes, areSameTypes, areScalar, areScalar, canVectorize, canVectorize
-
-
-
-
Constructor Detail
-
ExpressionLambdaAggregatorInputBindings
public ExpressionLambdaAggregatorInputBindings(Expr.ObjectBinding inputBindings, String accumulatorIdentifier, ExprEval<?> initialValue)
-
-
Method Detail
-
get
@Nullable public Object get(String name)
Description copied from interface:Expr.ObjectBinding
Get value binding for string identifier ofIdentifierExpr
- Specified by:
get
in interfaceExpr.ObjectBinding
-
getType
@Nullable public ExpressionType getType(String name)
Description copied from interface:Expr.InputBindingInspector
Get theExpressionType
from the backing store for a given identifier (this is likely a column, but could be other things depending on the backing adapter)- Specified by:
getType
in interfaceExpr.InputBindingInspector
-
accumulate
public void accumulate(ExprEval<?> eval)
-
getAccumulator
public ExprEval<?> getAccumulator()
-
setAccumulator
public void setAccumulator(ExprEval<?> acc)
-
-