org.eclipse.rdf4j.query.algebra.evaluation.impl

## Class SameTermFilterOptimizer

- java.lang.Object
- - org.eclipse.rdf4j.query.algebra.evaluation.impl.SameTermFilterOptimizer

- All Implemented Interfaces:
    QueryOptimizer

      public class SameTermFilterOptimizer
      extends Object
      implements QueryOptimizer

  A query optimizer that embeds `Filter`s with `SameTerm` operators in statement patterns as much as possible. Operators like sameTerm(X, Y) are processed by renaming X to Y (or vice versa). Operators like sameTerm(X, ) are processed by assigning the URI to all occurring variables with name X.
  Author:
    Arjohn Kampman, James Leigh

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `SameTermFilterOptimizer.BindingSetAssignmentCollector`
    `protected static class` | `SameTermFilterOptimizer.SameTermFilterVisitor`
    `protected static class` | `SameTermFilterOptimizer.VarBinder`
    `protected static class` | `SameTermFilterOptimizer.VarRenamer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SameTermFilterOptimizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `optimize(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings)` Applies generally applicable optimizations to the supplied query: variable assignments are inlined.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SameTermFilterOptimizer

          public SameTermFilterOptimizer()

  - ### Method Detail

    - #### optimize

          public void optimize(TupleExpr tupleExpr,
                               Dataset dataset,
                               BindingSet bindings)

      Applies generally applicable optimizations to the supplied query: variable assignments are inlined.
      Specified by:
        `optimize` in interface `QueryOptimizer`

Copyright © 2015-2021 Eclipse Foundation. All Rights Reserved.