Package org.apache.druid.math.expr
Class Function.SafeDivide
- java.lang.Object
-
- org.apache.druid.math.expr.Function.BivariateFunction
-
- org.apache.druid.math.expr.Function.BivariateMathFunction
-
- org.apache.druid.math.expr.Function.SafeDivide
-
- All Implemented Interfaces:
Function,NamedFunction
- Enclosing interface:
- Function
public static class Function.SafeDivide extends Function.BivariateMathFunction
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.druid.math.expr.Function
Function.Abs, Function.Acos, Function.ArrayAddElementFunction, Function.ArrayAppendFunction, Function.ArrayConcatFunction, Function.ArrayConstructorFunction, Function.ArrayContainsFunction, Function.ArrayLengthFunction, Function.ArrayOffsetFunction, Function.ArrayOffsetOfFunction, Function.ArrayOrdinalFunction, Function.ArrayOrdinalOfFunction, Function.ArrayOverlapFunction, Function.ArrayPrependFunction, Function.ArrayScalarFunction, Function.ArraySetAddAllFunction, Function.ArraySetAddFunction, Function.ArraysFunction, Function.ArraySliceFunction, Function.ArraysMergeFunction, Function.ArrayToMultiValueStringFunction, Function.ArrayToStringFunction, Function.Asin, Function.Atan, Function.Atan2, Function.BitwiseAnd, Function.BitwiseComplement, Function.BitwiseConvertDoubleToLongBits, Function.BitwiseConvertLongBitsToDouble, Function.BitwiseOr, Function.BitwiseShiftLeft, Function.BitwiseShiftRight, Function.BitwiseXor, Function.BivariateBitwiseMathFunction, Function.BivariateFunction, Function.BivariateMathFunction, Function.CaseSearchedFunc, Function.CaseSimpleFunc, Function.CastFunc, Function.Cbrt, Function.Ceil, Function.CoalesceFunc, Function.ConcatFunc, Function.ConditionFunc, Function.CopySign, Function.Cos, Function.Cosh, Function.Cot, Function.Div, Function.DoubleBivariateMathFunction, Function.DoubleUnivariateMathFunction, Function.Exp, Function.Expm1, Function.Floor, Function.GetExponent, Function.GreatestFunc, Function.HumanReadableBinaryByteFormatFunc, Function.HumanReadableDecimalByteFormatFunc, Function.HumanReadableDecimalFormatFunc, Function.Hypot, Function.IsDistinctFromFunc, Function.IsFalseFunc, Function.IsNotDistinctFromFunc, Function.IsNotFalseFunc, Function.IsNotNullFunc, Function.IsNotTrueFunc, Function.IsNullFunc, Function.IsTrueFunc, Function.LeastFunc, Function.LeftFunc, Function.Log, Function.Log10, Function.Log1p, Function.LowerFunc, Function.LpadFunc, Function.Max, Function.Min, Function.MultiValueStringHarmonizeNullsFunction, Function.MultiValueStringToArrayFunction, Function.NextAfter, Function.NextUp, Function.NvlFunc, Function.ParseLong, Function.Pi, Function.Pow, Function.ReduceFunction, Function.Remainder, Function.RepeatFunc, Function.ReplaceFunc, Function.ReverseFunc, Function.RightFunc, Function.Rint, Function.Round, Function.RpadFunc, Function.SafeDivide, Function.ScalarInArrayFunction, Function.Scalb, Function.Signum, Function.Sin, Function.Sinh, Function.SizeFormatFunc, Function.Sqrt, Function.StringFormatFunc, Function.StringLongFunction, Function.StringToArrayFunction, Function.StrlenFunc, Function.StrposFunc, Function.SubMonthFunc, Function.SubstringFunc, Function.Tan, Function.Tanh, Function.TimestampFromEpochFunc, Function.ToDegrees, Function.ToRadians, Function.Ulp, Function.UnivariateFunction, Function.UnivariateMathFunction, Function.UnixTimestampFunc, Function.UpperFunc
-
-
Constructor Summary
Constructors Constructor Description SafeDivide()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanVectorize(Expr.InputBindingInspector inspector, List<Expr> args)Check if a function can be 'vectorized', for a given set ofExprinputs.protected ExprEvaleval(double x, double y)protected ExprEvaleval(long x, long y)ExpressionTypegetOutputType(Expr.InputBindingInspector inspector, List<Expr> args)Compute the output type of this function for a given set of argument expression inputs.Stringname()Name of the function-
Methods inherited from class org.apache.druid.math.expr.Function.BivariateMathFunction
eval
-
Methods inherited from class org.apache.druid.math.expr.Function.BivariateFunction
apply, validateArguments
-
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.Function
asSingleThreaded, asVectorProcessor, getArrayInputs, getScalarInputs, hasArrayInputs, hasArrayOutput
-
Methods inherited from interface org.apache.druid.math.expr.NamedFunction
processingFailed, validationFailed, validationFailed, validationHelperCheckAnyOfArgumentCount, validationHelperCheckArgIsLiteral, validationHelperCheckArgumentCount, validationHelperCheckArgumentCount, validationHelperCheckArgumentRange, validationHelperCheckLambaArgumentCount, validationHelperCheckMinArgumentCount, validationHelperCheckMinArgumentCount
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public String name()
Description copied from interface:NamedFunctionName of the function
-
getOutputType
@Nullable public ExpressionType getOutputType(Expr.InputBindingInspector inspector, List<Expr> args)
Description copied from interface:FunctionCompute the output type of this function for a given set of argument expression inputs.- Specified by:
getOutputTypein interfaceFunction- Overrides:
getOutputTypein classFunction.BivariateMathFunction- See Also:
Expr.getOutputType(org.apache.druid.math.expr.Expr.InputBindingInspector)
-
canVectorize
public boolean canVectorize(Expr.InputBindingInspector inspector, List<Expr> args)
Description copied from interface:FunctionCheck if a function can be 'vectorized', for a given set ofExprinputs. If this method returns true,Function.asVectorProcessor(org.apache.druid.math.expr.Expr.VectorInputBindingInspector, java.util.List<org.apache.druid.math.expr.Expr>)is expected to produce aExprVectorProcessorwhich can evaluate values in batches to use with vectorized query engines.- Specified by:
canVectorizein interfaceFunction- Overrides:
canVectorizein classFunction.BivariateMathFunction- See Also:
Expr.canVectorize(Expr.InputBindingInspector),ApplyFunction.canVectorize(Expr.InputBindingInspector, Expr, List)
-
eval
protected ExprEval eval(long x, long y)
- Overrides:
evalin classFunction.BivariateMathFunction
-
eval
protected ExprEval eval(double x, double y)
- Overrides:
evalin classFunction.BivariateMathFunction
-
-