Package io.delta.kernel.engine
Interface ExpressionHandler
Provides expression evaluation capability to Delta Kernel. Delta Kernel can use this client
to evaluate predicate on partition filters, fill up partition column values and any computation
on data using
Expressions.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateSelectionVector(boolean[] values, int from, int to) Create a selection vector, a boolean typeColumnVector, on top of the range of values given in values array.getEvaluator(StructType inputSchema, Expression expression, DataType outputType) Create anExpressionEvaluatorthat can evaluate the given expression onColumnarBatchs with the given batchSchema.getPredicateEvaluator(StructType inputSchema, Predicate predicate) Create aPredicateEvaluatorthat can evaluate the given predicate expression and return a selection vector (ColumnVectorofbooleantype).
-
Method Details
-
getEvaluator
ExpressionEvaluator getEvaluator(StructType inputSchema, Expression expression, DataType outputType) Create anExpressionEvaluatorthat can evaluate the given expression onColumnarBatchs 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.- Parameters:
inputSchema- Input data schemaexpression- Expression to evaluate.outputType- Expected result data type.
-
getPredicateEvaluator
Create aPredicateEvaluatorthat can evaluate the given predicate expression and return a selection vector (ColumnVectorofbooleantype).- Parameters:
inputSchema- Schema of the data referred by the given predicate expression.predicate- Predicate expression to evaluate.- Returns:
-
createSelectionVector
Create a selection vector, a boolean typeColumnVector, on top of the range of values given in values array.- Parameters:
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.- Returns:
- A
ColumnVectorofbooleantype values.
-