Package org.apache.druid.math.expr
Class LambdaExpr
java.lang.Object
org.apache.druid.math.expr.LambdaExpr
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.druid.math.expr.Expr
Expr.BindingAnalysis, Expr.InputBindingInspector, Expr.ObjectBinding, Expr.Shuttle, Expr.VectorInputBinding, Expr.VectorInputBindingInspector -
Field Summary
Fields inherited from interface org.apache.druid.math.expr.Expr
ARG_JOINER, NULL_LITERAL -
Method Summary
Modifier and TypeMethodDescription<T> ExprVectorProcessor<T> Builds a 'vectorized' expression processor, that can operate on batches of input values for use in vectorized query engines.booleancanVectorize(Expr.InputBindingInspector inspector) Check if an expression can be 'vectorized', for a given set of inputs.booleaneval(Expr.ObjectBinding bindings) getExpr()getOutputType(Expr.InputBindingInspector inspector) Given anExpr.InputBindingInspector, compute what the outputExpressionTypewill be for this expression.inthashCode()Convert theExprback into parseable string that when parsed withParser.parse(String, ExprMacroTable)will produce an equivalentExpr.toString()visit(Expr.Shuttle shuttle) Programatically rewrite theExprtree with aExpr.Shuttle.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.druid.math.expr.Expr
asBitmapColumnIndex, asColumnIndexSupplier, asSingleThreaded, decorateCacheKeyBuilder, getBindingIfIdentifier, getCacheKey, getIdentifierExprIfIdentifierExpr, getIdentifierIfIdentifier, getLiteralValue, isIdentifier, isLiteral, isNullLiteral
-
Method Details
-
toString
-
getIdentifier
-
getIdentifiers
-
stringifyIdentifiers
-
getExpr
-
canVectorize
Description copied from interface:ExprCheck if an expression can be 'vectorized', for a given set of inputs. If this method returns true,Expr.asVectorProcessor(org.apache.druid.math.expr.Expr.VectorInputBindingInspector)is expected to produce aExprVectorProcessorwhich can evaluate values in batches to use with vectorized query engines.- Specified by:
canVectorizein interfaceExpr- Parameters:
inspector-
-
asVectorProcessor
Description copied from interface:ExprBuilds a 'vectorized' expression processor, that can operate on batches of input values for use in vectorized query engines.- Specified by:
asVectorProcessorin interfaceExpr- Parameters:
inspector-
-
eval
Description copied from interface:Expr -
stringify
Description copied from interface:ExprConvert theExprback into parseable string that when parsed withParser.parse(String, ExprMacroTable)will produce an equivalentExpr. -
visit
Description copied from interface:ExprProgramatically rewrite theExprtree with aExpr.Shuttle. EachExpris responsible for ensuring theExpr.Shuttlecan visit all of itsExprchildren, as well as updating its childrenExprwith the results from theExpr.Shuttle, before finally visiting an updated form of itself. When this Expr is the result ofExprMacroTable.ExprMacro.apply(java.util.List<org.apache.druid.math.expr.Expr>), all of the original arguments to the macro must be visited, including arguments that may have been "baked in" to this Expr. -
analyzeInputs
Description copied from interface:Expr- Specified by:
analyzeInputsin interfaceExpr
-
getOutputType
Description copied from interface:ExprGiven anExpr.InputBindingInspector, compute what the outputExpressionTypewill be for this expression. In the vectorized expression engine, ifExpr.canVectorize(InputBindingInspector)returns true, a return value of null MUST ONLY indicate that the expression has all null inputs (non-existent columns) or null constants for the entire expression. Otherwise, all vectorizable expressions must produce an output type to correctly operate with the vectorized engine. Outside the context of vectorized expressions, a return value of null can also indicate that the given type information was not enough to resolve the output type, so the expression must be evaluated using defaultExpr.eval(org.apache.druid.math.expr.Expr.ObjectBinding)handling where types are only known after evaluation, throughExprEval.type(), such as transform expressions at ingestion time- Specified by:
getOutputTypein interfaceExpr
-
equals
-
hashCode
public int hashCode()
-