Class VectorProcessors
java.lang.Object
org.apache.druid.math.expr.vector.VectorProcessors
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ExprVectorProcessor<T>and(Expr.VectorInputBindingInspector inputTypes, Expr left, Expr right) Creates anExprVectorProcessorfor the logical 'and' operator, which produces a long typed vector output with values set by the following rules: true/true -> true (1) true/null, null/true, null/null -> null false/null, null/false -> false (0)static <T> ExprVectorProcessor<T>static <T> ExprVectorProcessor<T>static <T> ExprVectorProcessor<T>constant(Object constant, int maxVectorSize, ExpressionType type) Creates anExprVectorProcessorthat creates aExprEvalVectorfor a constant any non-numeric value.static ExprVectorProcessor<?>identifier(Expr.VectorInputBindingInspector inspector, String binding) Creates anExprVectorProcessorthat creates aExprEvalVectorfor some expression variable input binding, typically for segment column value vectors from aVectorValueSelectororVectorObjectSelector.static <T> ExprVectorProcessor<T>isNotNull(Expr.VectorInputBindingInspector inspector, Expr expr) Creates anExprVectorProcessorfor the 'isnotnull' function, that produces a "boolean" typed output vector (long[]) with values set to 1 if the input value was not null or 0 if it was null.static <T> ExprVectorProcessor<T>isNull(Expr.VectorInputBindingInspector inspector, Expr expr) Creates anExprVectorProcessorfor the 'isnull' function, that produces a "boolean" typed output vector (long[]) with values set to 1 if the input value was null or 0 if it was not null.static <T> ExprVectorProcessor<T>makeSymmetricalProcessor(Expr.VectorInputBindingInspector inspector, Expr left, Expr right, Supplier<ExprVectorProcessor<?>> longProcessor, Supplier<ExprVectorProcessor<?>> doubleProcessor, Supplier<ExprVectorProcessor<?>> objectProcessor) Make a 2 argument, symmetrical processor where both argments must be the same input type and produce the same output type long, long -> long double, double -> double string, string -> stringstatic <T> ExprVectorProcessor<T>not(Expr.VectorInputBindingInspector inspector, Expr expr) Creates anExprVectorProcessorfor the logical 'not' operator, which produces a long typed vector output with values set by the following rules: false -> true (1) null -> null true -> false (0)static <T> ExprVectorProcessor<T>or(Expr.VectorInputBindingInspector inspector, Expr left, Expr right) Creates anExprVectorProcessorfor the logical 'or' operator, which produces a long typed vector output with values set by the following rules: true/null, null/true -> true (1) false/null, null/false, null/null -> null false/false -> false (0)static <T> ExprVectorProcessor<T>parseLong(Expr.VectorInputBindingInspector inspector, Expr arg, int radix) Creates anExprVectorProcessorthat will parse a string into a long value given a radix.
-
Method Details
-
makeSymmetricalProcessor
public static <T> ExprVectorProcessor<T> makeSymmetricalProcessor(Expr.VectorInputBindingInspector inspector, Expr left, Expr right, Supplier<ExprVectorProcessor<?>> longProcessor, Supplier<ExprVectorProcessor<?>> doubleProcessor, Supplier<ExprVectorProcessor<?>> objectProcessor) Make a 2 argument, symmetrical processor where both argments must be the same input type and produce the same output type long, long -> long double, double -> double string, string -> string -
constant
public static <T> ExprVectorProcessor<T> constant(@Nullable Object constant, int maxVectorSize, ExpressionType type) Creates anExprVectorProcessorthat creates aExprEvalVectorfor a constant any non-numeric value. Numeric types should useconstant(Double, int)orconstant(Long, int)instead.- See Also:
-
org.apache.druid.math.expr.ConstantExpr<T>
-
constant
- See Also:
-
org.apache.druid.math.expr.ConstantExpr<T>
-
constant
- See Also:
-
org.apache.druid.math.expr.ConstantExpr<T>
-
identifier
public static ExprVectorProcessor<?> identifier(Expr.VectorInputBindingInspector inspector, String binding) Creates anExprVectorProcessorthat creates aExprEvalVectorfor some expression variable input binding, typically for segment column value vectors from aVectorValueSelectororVectorObjectSelector.- See Also:
-
IdentifierExpr
-
parseLong
public static <T> ExprVectorProcessor<T> parseLong(Expr.VectorInputBindingInspector inspector, Expr arg, int radix) Creates anExprVectorProcessorthat will parse a string into a long value given a radix.- See Also:
-
isNull
public static <T> ExprVectorProcessor<T> isNull(Expr.VectorInputBindingInspector inspector, Expr expr) Creates anExprVectorProcessorfor the 'isnull' function, that produces a "boolean" typed output vector (long[]) with values set to 1 if the input value was null or 0 if it was not null.- See Also:
-
isNotNull
public static <T> ExprVectorProcessor<T> isNotNull(Expr.VectorInputBindingInspector inspector, Expr expr) Creates anExprVectorProcessorfor the 'isnotnull' function, that produces a "boolean" typed output vector (long[]) with values set to 1 if the input value was not null or 0 if it was null.- See Also:
-
not
Creates anExprVectorProcessorfor the logical 'not' operator, which produces a long typed vector output with values set by the following rules: false -> true (1) null -> null true -> false (0)- See Also:
-
UnaryNotExpr
-
or
public static <T> ExprVectorProcessor<T> or(Expr.VectorInputBindingInspector inspector, Expr left, Expr right) Creates anExprVectorProcessorfor the logical 'or' operator, which produces a long typed vector output with values set by the following rules: true/null, null/true -> true (1) false/null, null/false, null/null -> null false/false -> false (0)- See Also:
-
BinOrExpr
-
and
public static <T> ExprVectorProcessor<T> and(Expr.VectorInputBindingInspector inputTypes, Expr left, Expr right) Creates anExprVectorProcessorfor the logical 'and' operator, which produces a long typed vector output with values set by the following rules: true/true -> true (1) true/null, null/true, null/null -> null false/null, null/false -> false (0)- See Also:
-
BinAndExpr
-