Interface ExpressionHandler


@Evolving public 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 Details

    • getEvaluator

      ExpressionEvaluator getEvaluator(StructType inputSchema, Expression expression, DataType outputType)
      Create an ExpressionEvaluator that can evaluate the given expression on ColumnarBatchs 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 schema
      expression - Expression to evaluate.
      outputType - Expected result data type.
    • getPredicateEvaluator

      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).
      Parameters:
      inputSchema - Schema of the data referred by the given predicate expression.
      predicate - Predicate expression to evaluate.
      Returns:
    • createSelectionVector

      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.
      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 ColumnVector of boolean type values.