Package org.eclipse.rdf4j.query.algebra.evaluation

## Interface QueryEvaluationStep

- All Known Subinterfaces:
    `SliceQueryEvaluationStep`
  All Known Implementing Classes:
    `BindingSetAssignmentQueryEvaluationStep`, `ExtensionQueryEvaluationStep`, `IntersectionQueryEvaluationStep`, `JoinQueryEvaluationStep`, `LeftJoinQueryEvaluationStep`, `MinusQueryEvaluationStep`, `OrderQueryEvaluationStep`, `ProjectionQueryEvaluationStep`, `RdfStarQueryEvaluationStep`, `ReificationRdfStarQueryEvaluationStep`, `ServiceQueryEvaluationStep`, `SliceQueryEvaluationStep.OffSetAndLimitQueryEvaluationStep`, `SliceQueryEvaluationStep.OnlyLimitQueryEvaluationStep`, `SliceQueryEvaluationStep.OnlyOffsetQueryEvaluationStep`, `StatementPatternQueryEvaluationStep`, `UnionQueryEvaluationStep`, `ZeroLengthPathEvaluationStep`
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface QueryEvaluationStep

  A Step that may need to be executed in a EvaluationStrategy. The evaluate method should do the minimal work required to evaluate given the bindings. As much as possible should be pre-computed (e.g. resolving constant values)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `QueryEvaluationStep.DelayedEvaluationIteration` | Utility class that removes code duplication and makes a precompiled QueryEvaluationStep available as an iteration that may be created and used later.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CloseableIteration<BindingSet,​QueryEvaluationException>` | `evaluate​(BindingSet bindings)` |
    `static QueryEvaluationStep` | `minimal​(EvaluationStrategy strategy, TupleExpr expr)` | A fall back implementation that wraps a pre-existing evaluate method on a strategy
    `static QueryEvaluationStep` | `wrap​(QueryEvaluationStep qes, Function<CloseableIteration<BindingSet,​QueryEvaluationException>,​CloseableIteration<BindingSet,​QueryEvaluationException>> wrap)` | Wrap an QueryEvalationStep: where we apply a function on every evaluation result of the wrapped EvaluationStep.

- - ### Method Detail

    - #### evaluate

          CloseableIteration<BindingSet,​QueryEvaluationException> evaluate​(BindingSet bindings)

    - #### minimal

          static QueryEvaluationStep minimal​(EvaluationStrategy strategy,
                                             TupleExpr expr)

      A fall back implementation that wraps a pre-existing evaluate method on a strategy
      Parameters:
        `strategy` - that can evaluate the tuple expr.
        `expr` - that is going to be evaluated
      Returns:
        a thin wrapper arround the evaluation call.

    - #### wrap

          static QueryEvaluationStep wrap​(QueryEvaluationStep qes,
                                          Function<CloseableIteration<BindingSet,​QueryEvaluationException>,​CloseableIteration<BindingSet,​QueryEvaluationException>> wrap)

      Wrap an QueryEvalationStep: where we apply a function on every evaluation result of the wrapped EvaluationStep. Useful to add a timing function
      Parameters:
        `qes` - an QueryEvaluationStep that needs to return modified evaluation results
        `wrap` - the function that will do the modification
      Returns:
        a new evaluation step that executes wrap on the inner qes.