Package org.apache.druid.math.expr
@EverythingIsNonnullByDefault
package org.apache.druid.math.expr
-
ClassDescriptionBase interface describing the mechanism used to evaluate an
ApplyFunctionExpr, which 'applies' aLambdaExprto one or more arrayExpr.Evaluates to true if all element of the array inputExprcauses theLambdaExprto evaluate to a 'truthy' valueEvaluates to true if any element of the array inputExprcauses theLambdaExprto evaluate to a 'truthy' valueBase 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 valueBase class for "map" functions, which are a class ofApplyFunctionwhich take a lambda function that is mapped to the values of anApplyFunction.IndexableMapLambdaObjectBindingwhich is created from the outerExpr.ObjectBindingand the values of the arrayExprargument(s)Accumulate a value for the cartesian product of 'n' array inputs arguments with an 'n + 1' argumentLambdaExpr.Map the cartesian product of 'n' array input arguments to an 'n' argumentLambdaExprFilter an array to all elements that evaluate to a 'truthy' value for aLambdaExprAccumulate a value for a single array input with a 2 argumentLambdaExpr.Expr.ObjectBindingwhich can be iterated by an integer index position forApplyFunction.BaseFoldFunction.Expr.ObjectBindingwhich can be iterated by an integer index position forApplyFunction.BaseMapFunction.Helper that can wrap anotherExpr.InputBindingInspectorto use to supply the type information of aLambdaExprwhen evaluatingExpr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector).Map the scalar values of a single array inputExprto a single argumentLambdaExprBase class for family ofApplyFunctionwhich evaluate elements elements of a single array input against aLambdaExprto evaluate to a final 'truthy' valueSimple, mutable,Expr.ObjectBindingfor aLambdaExprwhich provides aMapfor storing arbitrary values to use as values forIdentifierExprin the body of the lambda that are arguments to the lambdaCartesianListcomputes the cartesian product of n lists.Base interface of Druid expression language abstract syntax tree nodes.Information about the context in whichIdentifierExprare used in a greaterExpr, listing the 'free variables' (total set of required input columns or values) and distinguishing between which identifiers are used as scalar inputs and which are used as array inputs.Mechanism to supply input types for the bindings which will backIdentifierExpr, to use in the aid of inferring the output type of an expression withExpr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector).Mechanism to supply values to backIdentifierExprduring expression evaluationMechanism to rewrite anExpr, implementing aExpr.Shuttleallows visiting all children of anExpr, and replacing them as desired.Mechanism to supply batches of input values to aExprVectorProcessorfor optimized processing.Expr.InputBindingInspector+ vectorizations stuff forExpr.asVectorProcessor(org.apache.druid.math.expr.Expr.VectorInputBindingInspector)DruidPredicateFactorywhose predicates evaluate anExpron the input match value, turning the result of that evaluation into aDruidPredicateMatch.UNKNOWNif the value is null, and if not, usingExprEval.asBoolean()to produceDruidPredicateMatch.TRUEorDruidPredicateMatch.FALSE.Uses the underlying dictionary values of a column to provideDruidPredicateIndexesthat apply anExprto the values of an input column before matching with aDruidPredicateFactory.Expressions processing configsThe type system used to process Druid expressions.ExprEval<T>Mechanism by which Druid expressions can define new functions for the Druid expression language.Base class forExprfromExprMacroTable.ExprMacro.Base class forExprfromExprMacroTable.ExprMacrothat accepts all-scalar arguments.stub interface to allowParser.flatten(Expr)a way to recognize macro functions that exend thisBase 'value' types of Druid expression language, allExprmust evaluate to one of these types.Base interface describing the mechanism used to evaluate aFunctionExpr.Scaffolding for a 2 argumentFunctionwhich accepts one array and one scalar input and adds the scalar input to the array in some way.Functionthat takes 1 array operand and 1 scalar operandFunctionthat takes 2 array operandsBase scaffolding for functions which accept 2 array arguments and combine them in some wayBase class for a 2 variable inputFunctionimplementationBase class for a 2 variable input mathematicalFunction, with specialized 'eval' implementations that operate on primitive number types"Searched CASE" function, similar toCASE WHEN boolean_expr THEN result [ELSE else_result] ENDin SQL."Simple CASE" function, similar toCASE expr WHEN value THEN result [ELSE else_result] ENDin SQL.Many math functions always output aDoubleprimitive, regardless of input type.Many math functions always output aDoubleprimitive, regardless of input type.SQL function "x IS DISTINCT FROM y".SQL function "IS FALSE".SQL function "x IS NOT DISTINCT FROM y".SQL function "IS NOT FALSE".SQL function "IS NOT TRUE".SQL function "IS TRUE".Primarily internal helper function used to coerce null, [], and [null] into [null], similar to the logic done byExpressionSelectors.supplierFromDimensionSelector(org.apache.druid.segment.DimensionSelector, boolean, boolean)when the 3rd argument is true, which is done when implicitly mapping scalar functions over mvd values.nvl is like coalesce, but accepts exactly two arguments.Base class for a 2 variable inputFunctionwhose first argument is aExprType.STRINGand second argument isExprType.LONG.Base class for a single variable inputFunctionimplementationBase class for a single variable input mathematicalFunction, with specialized 'eval' implementations that that operate on primitive number typesExpr.ObjectBindingbacked by a cache populated byExprEval.bestEffortOf(Object)for when the input type information is totally unknown, for a single row worth of values.Common stuff for "named" functions of "functional" expressions, such asFunctionExpr,ApplyFunctionExpr, andExprMacroTable.ExprMacroFunctionExpr.Simple map backed object binding