@Evolving public interface ExpressionHandler
Expression
s.Modifier and Type | Method and Description |
---|---|
ColumnVector |
createSelectionVector(boolean[] values,
int from,
int to)
Create a selection vector, a boolean type
ColumnVector , on top of the range of values
given in values array. |
ExpressionEvaluator |
getEvaluator(StructType inputSchema,
Expression expression,
DataType outputType)
Create an
ExpressionEvaluator that can evaluate the given expression on
ColumnarBatch s with the given batchSchema. |
PredicateEvaluator |
getPredicateEvaluator(StructType inputSchema,
Predicate predicate)
Create a
PredicateEvaluator that can evaluate the given predicate expression
and return a selection vector (ColumnVector of boolean type). |
ExpressionEvaluator getEvaluator(StructType inputSchema, Expression expression, DataType outputType)
ExpressionEvaluator
that can evaluate the given expression on
ColumnarBatch
s with the given batchSchema. The expression is
expected to be a scalar expression where for each one input row there
is a one output value.inputSchema
- Input data schemaexpression
- Expression to evaluate.outputType
- Expected result data type.PredicateEvaluator getPredicateEvaluator(StructType inputSchema, Predicate predicate)
PredicateEvaluator
that can evaluate the given predicate expression
and return a selection vector (ColumnVector
of boolean
type).inputSchema
- Schema of the data referred by the given predicate expression.predicate
- Predicate expression to evaluate.ColumnVector createSelectionVector(boolean[] values, int from, int to)
ColumnVector
, on top of the range of values
given in values array.values
- Array of initial boolean values for the selection vector. The ownership of
this array is with the caller and this method shouldn't depend on it after the
call is complete.from
- start index of the range, inclusive.to
- end index of the range, exclusive.ColumnVector
of boolean
type values.